Author Topic: wxWidgets: can't compile when using wxSmith  (Read 2461 times)

Offline ALPINE

  • Single posting newcomer
  • *
  • Posts: 3
wxWidgets: can't compile when using wxSmith
« on: July 12, 2008, 11:55:08 pm »
I used C::B in Linux and worked with wxWidgets (it works very well) and now I need to use this IDE in Windows.

I've installed C::B with MinGW, and wxWidgets (wxPack). There are no spaces in paths.

I've created new wxWidgets project (default "Hello World" application) and selected wxSmith as GUI Builder. But when I tried to compile it, I see this:

Compiling: MyTestApp.cpp
Compiling: MyTestMain.cpp
Compiling: resource.rc
Linking executable: bin\Debug\MyTest4.exe
C:\wxLibs\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `_Z10TIFFwxOpenR13wxInputStreamPKcS2_':
D:/devel/libraries/wxWidgets2.8.7/build/msw/../../src/common/imagtiff.cpp:209: undefined reference to `_TIFFClientOpen'
C:\wxLibs\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `_Z10TIFFwxOpenR14wxOutputStreamPKcS2_':
D:/devel/libraries/wxWidgets2.8.7/build/msw/../../src/common/imagtiff.cpp:221: undefined reference to `_TIFFClientOpen'
C:\wxLibs\lib\gcc_lib/libwxmsw28d_core.a(corelib_imagtiff.o): In function `_ZN13wxTIFFHandlerC2Ev':
D:/devel/libraries/wxWidgets2.8.7/build/msw/../../src/common/imagtiff.cpp:232: undefined reference to `_TIFFSetWarningHandler'
D:/devel/libraries/wxWidgets2.8.7/build/msw/../../src/common/imagtiff.cpp:233: undefined reference to `_TIFFSetErrorHandler'

... etc...

wxWidgets is installed in folder "C:\wxLibs", but I don't have disc D and I have no idea how "D:/devel/..." is appeared!

If I select wxFormBuilder as GUI Builder (or select "None") - application is compiled without any problems. But I never used wxFormBuilder (and I don't now where is it).

Choosing "None" GUI Builder and using "Configure wxSmith for current project" calls same errors as choosing wxSmith first time.

How to solve the problem?

Offline inventore123

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: wxWidgets: can't compile when using wxSmith
« Reply #1 on: July 13, 2008, 01:13:43 pm »
One possible solution: read this thread: http://forums.codeblocks.org/index.php/topic,8752.15.html
Here you can find a precompiled version of wx, specifically made for C::B
Hope this helps  :)

Offline ALPINE

  • Single posting newcomer
  • *
  • Posts: 3
Re: wxWidgets: can't compile when using wxSmith
« Reply #2 on: July 13, 2008, 07:31:36 pm »
Thanks, but there are other troubles when using it.

I found something else:

If i check "Use wxWidgets DLL" option - everything is compiled without any problems. But application that built with this option cannot be run on systems without installed wxWidgets libraries.

In Readme file of "precompiled version of wx, specifically made for C::B" I found this:

If you chose not to use the DLL, there is a bug somewhere, and compilation
will fail with some errors about -lwxpngd, to solve this go to
"Project>Build Options>Debug>Linker Settings>Link libraries"
and rename the following libraries:
libwxpngd.a   --->  libwxpng.a
libwxjpegd.a  --->  libwxjpeg.a
libwxtiffd.a  --->  libwxtiff.a
libwxzlibd.a  --->  libwxzlib.a
Now try compiling again and it should work.

But renaming doesn't make any effect :(

Offline ALPINE

  • Single posting newcomer
  • *
  • Posts: 3
Re: wxWidgets: can't compile when using wxSmith
« Reply #3 on: July 13, 2008, 07:54:45 pm »
Found solution :D

I've checked the "wxWidgets is built as monolithic library" option and now all is ok! :)