Author Topic: Code::Blocks + wxWidgeth project no compile clear project: wx* must be defined  (Read 22838 times)

Offline ioann

  • Multiple posting newcomer
  • *
  • Posts: 12
  • Sorry for my poor English
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:
  • Create project on wx 2.8, 2.9 (SVN)
  • Switch global variable (builtin fields base) between version
  • Compile wxWidgeth

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.
Sorry for my poor English

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
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.
« Last Edit: August 06, 2011, 04:19:39 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
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.

Offline ioann

  • Multiple posting newcomer
  • *
  • Posts: 12
  • Sorry for my poor English
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
except (where file nmake?):
Quote
nmake -f makefile.vc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
And Install wxPack on this steps

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.
Sorry for my poor English

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
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

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.

Offline ioann

  • Multiple posting newcomer
  • *
  • Posts: 12
  • Sorry for my poor English
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
« Last Edit: August 07, 2011, 07:36:27 am by ioann »
Sorry for my poor English

Offline ioann

  • Multiple posting newcomer
  • *
  • Posts: 12
  • Sorry for my poor English
any ideas?
Sorry for my poor English

Offline ioann

  • Multiple posting newcomer
  • *
  • Posts: 12
  • Sorry for my poor English
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
Sorry for my poor English

Offline ioann

  • Multiple posting newcomer
  • *
  • Posts: 12
  • Sorry for my poor English
ideas on how to run under windows, no?
Sorry for my poor English

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
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
or
here
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.

Offline ioann

  • Multiple posting newcomer
  • *
  • Posts: 12
  • Sorry for my poor English
Than you, all!
jens. than you.

Problem with wxWidgeth resolved
on wersion 2.8
Sorry for my poor English