Code::Blocks Forums

User forums => Help => Topic started by: GalaG on March 29, 2009, 12:30:55 pm

Title: unable to link WxWidget wxSmith default project
Post by: GalaG on March 29, 2009, 12:30:55 pm
I used the wizard to build a wxWidget from default project using version 8.2 of code::blocks.
and got this output:


Code
Linking executable: bin\Debug\wx3.exe
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagjpeg.o): In function `Z14wx_jpeg_io_srcP22jpeg_decompress_structR13wxInputStream':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:205: undefined reference to `jpeg_resync_to_restart'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagjpeg.o): In function `ZN13wxJPEGHandler8LoadFileEP7wxImageR13wxInputStreambi':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:238: undefined reference to `jpeg_std_error'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:252: undefined reference to `jpeg_destroy_decompress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:257: undefined reference to `jpeg_CreateDecompress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:259: undefined reference to `jpeg_read_header'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:273: undefined reference to `jpeg_start_decompress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:277: undefined reference to `jpeg_finish_decompress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:278: undefined reference to `jpeg_destroy_decompress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:290: undefined reference to `jpeg_read_scanlines'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:308: undefined reference to `jpeg_finish_decompress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:309: undefined reference to `jpeg_destroy_decompress'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagjpeg.o): In function `ZN13wxJPEGHandler8SaveFileEP7wxImageR14wxOutputStreamb':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:380: undefined reference to `jpeg_std_error'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:394: undefined reference to `jpeg_destroy_compress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:398: undefined reference to `jpeg_CreateCompress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:405: undefined reference to `jpeg_set_defaults'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:414: undefined reference to `jpeg_set_quality'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:450: undefined reference to `jpeg_start_compress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:456: undefined reference to `jpeg_write_scanlines'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:458: undefined reference to `jpeg_finish_compress'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagjpeg.cpp:459: undefined reference to `jpeg_destroy_compress'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `Z10TIFFwxOpenR13wxInputStreamPKcS2_':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:209: undefined reference to `TIFFClientOpen'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `Z10TIFFwxOpenR14wxOutputStreamPKcS2_':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:221: undefined reference to `TIFFClientOpen'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `ZN13wxTIFFHandlerC2Ev':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:232: undefined reference to `TIFFSetWarningHandler'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:233: undefined reference to `TIFFSetErrorHandler'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `ZN13wxTIFFHandlerC1Ev':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:232: undefined reference to `TIFFSetWarningHandler'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:233: undefined reference to `TIFFSetErrorHandler'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `ZN13wxTIFFHandler8LoadFileEP7wxImageR13wxInputStreambi':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:253: undefined reference to `TIFFSetDirectory'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:258: undefined reference to `TIFFClose'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:267: undefined reference to `TIFFGetField'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:268: undefined reference to `TIFFGetField'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:272: undefined reference to `TIFFGetFieldDefaulted'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:280: undefined reference to `_TIFFmalloc'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:287: undefined reference to `TIFFClose'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:298: undefined reference to `_TIFFfree'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:299: undefined reference to `TIFFClose'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:307: undefined reference to `TIFFReadRGBAImage'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:312: undefined reference to `_TIFFfree'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:314: undefined reference to `TIFFClose'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:347: undefined reference to `_TIFFfree'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:349: undefined reference to `TIFFClose'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `ZN13wxTIFFHandler13GetImageCountER13wxInputStream':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:364: undefined reference to `TIFFReadDirectory'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:366: undefined reference to `TIFFClose'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `ZN13wxTIFFHandler8SaveFileEP7wxImageR14wxOutputStreamb':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:383: undefined reference to `TIFFSetField'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:384: undefined reference to `TIFFSetField'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:385: undefined reference to `TIFFSetField'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:386: undefined reference to `TIFFSetField'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:387: undefined reference to `TIFFSetField'
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o):D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:392: more undefined references to `TIFFSetField' follow
D:\wxWidgets-2.8.10\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `ZN13wxTIFFHandler8SaveFileEP7wxImageR14wxOutputStreamb':
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:430: undefined reference to `TIFFScanlineSize'
D:/wxWidgets-2.8.10/build/msw/../../src/common/imagtiff.cpp:432: undefined reference to `TIFFScanlineSize'
Process terminated with status 1 (0 minutes, 11 seconds)
50 errors, 0 warnings

wxwidget setup seems to be ok because when I use the wxFormBuilder UI designer without any problems... or maybe I'm just missing  something

any ideas?
Thank you
Title: Re: unable to link WxWidget wxSmith default project
Post by: ollydbg on March 30, 2009, 02:38:11 pm
Quote
build a wxWidget
?
Did you set wx environment correctly.
Title: Re: unable to link WxWidget wxSmith default project
Post by: Biplab on March 30, 2009, 04:25:58 pm
Add libwxjpegd.a and libwxtiffd.a to Linker libraries.
Title: Re: unable to link WxWidget wxSmith default project
Post by: GalaG on March 31, 2009, 07:50:58 am
Add libwxjpegd.a and libwxtiffd.a to Linker libraries.

how..? can't find where....
in the wx global vars there is no such fields, only to the lib directory (D:\wxWidgets-2.8.10\lib\gcc_lib), should I use the '-l' to link these libraries  :?:


in the project properties there is a library tab, but it's empty.  :(

any Ideas?
THX
Title: Re: unable to link WxWidget wxSmith default project
Post by: ollydbg on March 31, 2009, 08:25:46 am
Add libwxjpegd.a and libwxtiffd.a to Linker libraries.

how..? can't find where....
in the wx global vars there is no such fields, only to the lib directory (D:\wxWidgets-2.8.10\lib\gcc_lib), should I use the '-l' to link these libraries  :?:


in the project properties there is a library tab, but it's empty.  :(

any Ideas?
THX

How did you build your wxWidgets library? It seems you are building separate libraries.( not a monolithic library)
You can find all the *.a libraries located in your path in my case (I:\wxWidgets-2.8.9\lib\gcc_dll).
Title: Re: unable to link WxWidget wxSmith default project
Post by: Jenna on March 31, 2009, 08:45:02 am
Adding  wxjpegd and wxtiffd to your projects "Build options -> Linker settings -> Link libraries" should work, if the libraries exist and the search-path to the libraries (normally set correctly by the wizard, if the global variable wx is set correctly.

If you use the wizard you have to chose the correct options for your wxwidgets-build (checkboxes in "wxWidgets Library Settings" at the last page of the wizard).