Re[3]: [Dev-C++] Problem with libjpeg in Dev C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <lis...@da...> - 2003-08-07 12:39:20
|
Hello dev-cpp-users; hello Per,
thanks for your reply! I didn't even know about extern (newbie at work ;)),
but now that I added it, everything works perfectly fine. Thanks again!
Your Message: (Wednesday, August 06, 2003, 1:29:05 PM)
PW> Are you compiling a c++ program? The jpeg library is in C. Did you
PW> remember to specify
PW> extern "C" {
PW> #include xxx
PW> }
PW> when including the jpeg include files?
PW> As you can see, the linker doesn't just complain about
PW> missing symbol _jpeg_std_error, but actually knows about what parameter
PW> types the function takes. This is because your source code is trying to
PW> call the jpeg functions in C++ mode, i.e. with name-mangled external
PW> references.
PW> /Per W
>> Thanks for your reply!
>>
>> Your Message: (Sunday, August 03, 2003, 10:51:28 AM)
>>
>> OB> Dennis Möhlmann wrote:
>>
>> >> Oops, didn't know the linker can any other error messages than this one (never
>> >> received a different error so far...)
>> >>
>> >> (hope this doesn't get wrapped...)
>> >>
>> >> g++.exe ../_obj/BlackMagic3D.o ../_obj/world.o ../_obj/entity.o ../_obj/engine.o ../_obj/model.o ../_obj/winmsg.o ../_obj/viewport.o ../_obj/keyboard.o ../_obj/renderer.o ../_obj/image.o -o
>> >> "..\_exe\BlackMagic3D.exe" -L"C:/Programme/Dev-Cpp/lib" -mwindows -lopengl32 -lglu32 -lglaux -lwinmm -ljpeg
>> >>
>> >> ../_obj/image.o(.text+0x68e):image.cpp: undefined reference to `jpeg_std_error(jpeg_error_mgr*)'
>> >> ../_obj/image.o(.text+0x6ad):image.cpp: undefined reference to `jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned)'
>> >> ../_obj/image.o(.text+0x6c2):image.cpp: undefined reference to `jpeg_stdio_src(jpeg_decompress_struct*, _iobuf*)'
>> >> ../_obj/image.o(.text+0x6d6):image.cpp: undefined reference to `jpeg_read_header(jpeg_decompress_struct*, int)'
>> >> ../_obj/image.o(.text+0x6e8):image.cpp: undefined reference to `jpeg_start_decompress(jpeg_decompress_struct*)'
>> >> ../_obj/image.o(.text+0x7f0):image.cpp: undefined reference to `jpeg_read_scanlines(jpeg_decompress_struct*, unsigned char**, unsigned)'
>> >> ../_obj/image.o(.text+0x828):image.cpp: undefined reference to `jpeg_finish_decompress(jpeg_decompress_struct*)'
>> >> ../_obj/image.o(.text+0x83a):image.cpp: undefined reference to `jpeg_destroy_decompress(jpeg_decompress_struct*)'
>>
>> OB> Well, it sais, it has undefined references of jpeg functions.
>> OB> I have no idea though why it has them, as the jpeg library has these
>> OB> functions.
>> OB> Maybe you should try to recompile the jpeg library from the code.
>>
>> OB> --
>> OB> Greetings,
>> OB> Balázs
>>
>> --
>> Best regards,
>> Dennis mailto:lis...@da...
--
Best regards,
Dennis mailto:lis...@da...
|