10-26-04 07:47 AM
Hi,
I have problems linking a c++ program to a C static archive (.a). I don't
know wether this is at all possible nor am I sure that this is the source
of my problems, but the g++ outputs the following:
g++ sf2raw.c \
-I../Smartspace/Development/Infrastructure/sources/sffile \
-I/usr/include/qt3 \
-lqt-mt -L$(QTDIR) \
-L ../Smartspace/Development/Infrastructure/sources/sffile \
./Smartspace/Development/Infrastructure/sources/sffile/libsffile.a \
-o sf2raw
/tmp/cckWYOAh.o(.text+0x297): In function `main':
: undefined reference to `sf_file_attach(int, sf_file_error*)'
/tmp/cckWYOAh.o(.text+0x2bd): In function `main':
: undefined reference to `sf_file_get_type(sf_file*, sf_file_error*)'
[...] //some more "undefined reference" errors
/tmp/cckWYOAh.o(.text+0x7d2): In function `main':
: undefined reference to `sf_file_detach(sf_file*, sf_file_error*)'
/tmp/cckWYOAh.o(.gnu.linkonce.t._Z19handle_sf_fileErrorPKc+0x1e): In
function `handle_sf_fileError(char const*)':
: undefined reference to `sf_file_perror(sf_file_error const*, char const*)'
collect2: ld returned 1 exit status
The sf_file_attach, etc. are defined in sffile.h, which reside in the above
include folder and there is also its object file sffile.o and the
libsffile.a.
sf2raw.c was originally a C program, so is all the Smartspace stuff, but I
changed the source of sf2raw.c to compile with g++ in order to be able to
link it against the qt libraries.
Anyone an idea what's wrong with the above?
Thanks in advance
Uwe
[ Post a follow-up to this message ]
|