I am attempting to use libisoburn in my c++ project to export log files directly to cd/dvd on an embedded system. For some reason I am having issues getting libisoburn to link against my application. The library is being found when attempting to link but the symbols are undefined. When I run readelf on my object file I get the following:
170: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _Z18isoburn_initializePci
and when I run readelf on libisoburn I get the following entries:
1198: 00000000000235c0 802 FUNC GLOBAL DEFAULT 11 isoburn_initialize
924: 00000000000235c0 802 FUNC GLOBAL DEFAULT 11 isoburn_initialize
All of that looks correct but I still get undefined symbols error.
I created a simple main.c and for some reason it compiles fine with gcc but not with g++. Below are the commands I used.
gcc -c main.c
gcc -o isoburntest main.o -lisofs -lburn -lisoburn
g++ -c main.c
g++ -o isoburntest main.o -lisofs -lburn -lisoburn
So the gcc compile works and the g++ compile fails. The failure is:
main.o: In function `main':
main.c:(.text+0x2a): undefined reference to `isoburn_initialize(char*, int)'
collect2: error: ld returned 1 exit status
Is there something I am missing that would cause this library not to work with c++?