Click here to Skip to main content
14,450,686 members

C / C++ / MFC

 
AnswerRe: Linking libraries - follow-up- gcc++ won't link Pin
CPallini28-Jan-20 6:13
mveCPallini28-Jan-20 6:13 
GeneralRe: Linking libraries - follow-up- gcc++ won't link Pin
k505428-Jan-20 7:47
Memberk505428-Jan-20 7:47 
GeneralRe: Linking libraries - follow-up- gcc++ won't link Pin
CPallini28-Jan-20 10:52
mveCPallini28-Jan-20 10:52 
AnswerRe: Linking libraries - follow-up- gcc++ won't link Pin
Vaclav_28-Jan-20 8:07
MemberVaclav_28-Jan-20 8:07 
GeneralRe: Linking libraries - follow-up- gcc++ won't link Pin
Richard MacCutchan28-Jan-20 10:22
communityengineerRichard MacCutchan28-Jan-20 10:22 
AnswerSOLVED (?) Re: Linking libraries - follow-up- gcc++ won't link Pin
Vaclav_29-Jan-20 5:00
MemberVaclav_29-Jan-20 5:00 
GeneralRe: SOLVED (?) Re: Linking libraries - follow-up- gcc++ won't link Pin
Richard MacCutchan29-Jan-20 5:16
communityengineerRichard MacCutchan29-Jan-20 5:16 
QuestionReverse engineering GCC output - need library file (name) and path. Pin
Vaclav_27-Jan-20 6:34
MemberVaclav_27-Jan-20 6:34 
I am posting this here because I hope the actual output will help to solve the issue , and it is not small!
I have an app using bluetooth - linked to library "bluetooth". It works fine.
I need to identify the actual type of library ( Linux .a or .so ).
GCC options do not require prefix, such as "lib." or suffix - .a or .so thus GCC output cannot tell me the library file full name.
I also need the (-L) path to the library and GCC does not correlate -L with -l.

Help will be appreciated.

PS Please ignore the "undefined.." error.

Here is the actual GCC linker output
make all 
Building target: RPI_BT_SERVER
Invoking: GCC C++ Linker
g++ -L/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_COMMON/src/MODULES/M_SOCKET_COMMON -L"/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB/Debug" -v -o "RPI_BT_SERVER"  ./src/MODULES/M_FILE_CLASS/CFILECLASS.o  ./src/RPI_BT_SERVER.o   -lbluetooth -lRPI_BT_LIB
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.12' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-L/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_COMMON/src/MODULES/M_SOCKET_COMMON' '-L/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB/Debug' '-v' '-o' 'RPI_BT_SERVER' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccoEji8m.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o RPI_BT_SERVER /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_COMMON/src/MODULES/M_SOCKET_COMMON -L/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB/Debug -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. ./src/MODULES/M_FILE_CLASS/CFILECLASS.o ./src/RPI_BT_SERVER.o -lbluetooth -lRPI_BT_LIB -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o
/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB/Debug/libRPI_BT_LIB.a(CSOCKETCOMMON.o): In function `std::C_SOCKET_COMMON::SelectDevice(int)':
/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/2019-12/Eclipse_2019_12/eclipse/Workspace_2019_12/RPI_BT_LIB/Debug/../MODULE/M_SOCKET/CSOCKETCOMMON.cpp:144: undefined reference to `str2ba'

AnswerRe: Reverse engineering GCC output - need library file (name) and path. Pin
Gerry Schmitz27-Jan-20 6:55
mveGerry Schmitz27-Jan-20 6:55 
GeneralRe: Reverse engineering GCC output - need library file (name) and path. Pin
Vaclav_28-Jan-20 3:44
MemberVaclav_28-Jan-20 3:44 
AnswerRe: Reverse engineering GCC output - need library file (name) and path. Pin
Richard MacCutchan27-Jan-20 7:09
communityengineerRichard MacCutchan27-Jan-20 7:09 
AnswerRe: Reverse engineering GCC output - need library file (name) and path. Pin
k505427-Jan-20 7:24
Memberk505427-Jan-20 7:24 
GeneralRe: Reverse engineering GCC output - need library file (name) and path. Pin
Vaclav_27-Jan-20 8:00
MemberVaclav_27-Jan-20 8:00 
AnswerRe: Reverse engineering GCC output - need library file (name) and path. Pin
leon de boer27-Jan-20 23:28
Memberleon de boer27-Jan-20 23:28 
GeneralRe: Reverse engineering GCC output - need library file (name) and path. Pin
Vaclav_28-Jan-20 3:45
MemberVaclav_28-Jan-20 3:45 
QuestionDPI aware, I am confused Pin
Erich Jarz23-Jan-20 8:25
MemberErich Jarz23-Jan-20 8:25 
AnswerRe: DPI aware, I am confused Pin
Gerry Schmitz23-Jan-20 8:37
mveGerry Schmitz23-Jan-20 8:37 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz23-Jan-20 9:27
MemberErich Jarz23-Jan-20 9:27 
GeneralRe: DPI aware, I am confused Pin
leon de boer24-Jan-20 8:05
Memberleon de boer24-Jan-20 8:05 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz24-Jan-20 8:42
MemberErich Jarz24-Jan-20 8:42 
GeneralRe: DPI aware, I am confused Pin
leon de boer24-Jan-20 20:41
Memberleon de boer24-Jan-20 20:41 
GeneralRe: DPI aware, I am confused Pin
Erich Jarz26-Jan-20 21:22
MemberErich Jarz26-Jan-20 21:22 
GeneralRe: DPI aware, I am confused Pin
Gerry Schmitz24-Jan-20 9:27
mveGerry Schmitz24-Jan-20 9:27 
GeneralRe: DPI aware, I am confused Pin
Richard MacCutchan23-Jan-20 10:59
communityengineerRichard MacCutchan23-Jan-20 10:59 
Questionwin32 Radio button doesn't show when is checked Pin
coco24319-Jan-20 7:53
Membercoco24319-Jan-20 7:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.