Code::Blocks Forums

User forums => Help => Topic started by: ioann on August 06, 2011, 03:58:18 pm

Title: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: ioann on August 06, 2011, 03:58:18 pm
Sorry for my poor English.
IDE: CodeBlocks 10.05
wxWidgeth: 2.8.10 | 2.9.1 | 2.9.2
OS: Windows 7 Pro 64 bit

I have problem on build clear project on wxWidgeth with Code::Blocks. Build show me errors list
Quote
C:\wxMSW-2.8.10\include\wx\platform.h|196|error: wx/setup.h: No such file or directory
C:\wxMSW-2.8.10\include\wx\chkconf.h|103|error: #error "wxUSE_DYNLIB_CLASS must be defined."
...
I already tried:

On OS Ubuntu i have error:
Quote
/projects/test6/test6App.h|13|fatal error: wx/app.h: No such file or directory|

Goes i no have possibility compile project any platform. Need help, please.
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: stahta01 on August 06, 2011, 04:14:24 pm
Read http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
Quote
I get errors like "wx/setup.h: No such file or directory"

You're missing an important compiler search path in your build options. Make sure you choose the correct wxWidgets build configuration when running the wxWidgets project wizard. If re-running the wizard isn't an option, then open your project's build options and add "$(#wx.lib)\gcc_dll\mswu" (assuming a monolithic Unicode DLL build) to the compiler search paths.

Code
C:\wxMSW-2.8.10\include\wx\platform.h|196|error: wx/setup.h: No such file or directory

Did YOU build wxWidgets?
If not, do so.

If yes, turn on Full Compiler Logging.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

You likely have missing or wrong Compiler search directories.

Tim S.
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: Jenna on August 06, 2011, 05:03:21 pm
On ubuntu you need the packages wx-common and libwxgtk2.8-dev (and all the dependencies of these packages).
After installing them (and restarting C::B, if it is not closed), you should be able to  use the wizard-created wxWidgets-project.
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: ioann on August 06, 2011, 07:23:05 pm
To stahta01
I no destend this :
Quote
If re-running the wizard isn't an option, then open your project's build options and add "$(#wx.lib)\gcc_dll\mswu" (assuming a monolithic Unicode DLL build) to the compiler search paths.

Nevertheless:
Complete steps on this (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef)
except (where file nmake?):
Quote
nmake -f makefile.vc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
And Install wxPack on this steps (http://wxpack.sourceforge.net/Tutorials/CodeBlocks)

And switch Code::Block on new wxWidgeth (path wx on create project and on Settings->GlobalVariables)
Quote
C:\SourceCode\Libraries\wxWidgets2.8
06.08.2011  19:47    <DIR>          .
06.08.2011  19:47    <DIR>          ..
06.08.2011  19:48    <DIR>          additions
06.08.2011  19:47    <DIR>          art
06.08.2011  19:47    <DIR>          build
06.08.2011  19:47    <DIR>          contrib
06.08.2011  19:47    <DIR>          docs
06.08.2011  19:47    <DIR>          include
06.08.2011  19:48    <DIR>          lib
06.08.2011  19:47    <DIR>          locale
06.08.2011  19:47    <DIR>          samples
06.08.2011  19:47    <DIR>          src
06.08.2011  19:48         1я372я740 unins000.dat
06.08.2011  19:47         1я180я223 unins000.exe
06.08.2011  19:47    <DIR>          utils

And Compile clear project - have new error: full log on attach "CodeBlocks_ClProjOnWx_FullLogBuild.txt"

Yes.. This cross platform bigest problem after C# on Visual Studio.
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: Jenna on August 06, 2011, 07:32:58 pm
Looks like incomaptible compilers (different exception handling).

Why not compiling wxWidgets yourself, it's quite straightforward.

http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Build_wxWidgets (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Build_wxWidgets)

Don't use nmake and the *.vc makefile, if you use MinGW as your compiler !

Use mingw32-make or make from MinGW and the *.gcc makefile.
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: ioann on August 06, 2011, 07:45:46 pm
To Jens on second reply
Before i compile wxWidgeth on version wxMSW-2.8.10 and have error list on first post.
Quote
Don't use nmake and the *.vc makefile, if you use MinGW as your compiler !
Ok. I will not. And still not working.
Quote
Use mingw32-make or make from MinGW and the *.gcc makefile.
yes, i use and this long time (5 minute) compiling wxWidgeth
Quote
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: ioann on August 07, 2011, 10:16:02 am
any ideas?
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: ioann on August 07, 2011, 10:51:17 am
On ubuntu you need the packages wx-common and libwxgtk2.8-dev (and all the dependencies of these packages).
After installing them (and restarting C::B, if it is not closed), you should be able to  use the wizard-created wxWidgets-project.
Ok,  Thanks. It's work
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: ioann on August 07, 2011, 09:26:18 pm
ideas on how to run under windows, no?
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: Jenna on August 07, 2011, 09:42:35 pm
ideas on how to run under windows, no?
If you follow the steps in the quick-ref as I wrote here:
Looks like incomaptible compilers (different exception handling).
Why not compiling wxWidgets yourself, it's quite straightforward.

http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Build_wxWidgets (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef#Build_wxWidgets)
or
here (http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook#wxWidgets)
it should not be a problem.

Note compiling wxWidgets can take a long time.

Or you need to find a compiler that is compatible with the one used by the one used to build the wxpack-binaries.
Title: Re: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined
Post by: ioann on August 14, 2011, 12:04:58 am
Than you, all!
jens. than you.

Problem with wxWidgeth resolved
on wersion 2.8