This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc -x c does link with -ljpeg, gcc -x c++ does not


Hi,

I want to compile and link a small program (c code) that uses libjpeg. When I 
invoke "gcc -x c -v readcoeff.c -ljpeg" everything works fine, but invoking 
"gcc -x c++ -v readcoeff.c -ljpeg" gives "undefined reference..."-error 
messages for every function from libjpeg (see the attached outputs).

Any Ideas what could be causing this ?

Thanks,
Stefan Hetzl

Attachment: out_c
Description: Text document

Attachment: out_cpp
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]