Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: David_004 on October 05, 2009, 01:07:29 pm

Title: Cannot build wxwidgets using codeblock on windows
Post by: David_004 on October 05, 2009, 01:07:29 pm
Greetings everyone , i have been looking for a solution for two weeks now . As windows and visual studio user , i really wanted to start using wxwidgets and codeblocks looked a very nice fresh compiler . Although im stuck at very simple problems and i cant seem to find a solution therefore i had to finaly create a topic.

My question is. MSVC already installed , i install wxwidgets aswell and open .dsw file under msvc . Everything compiles nicely without any errors. However when i import that workspace into codeblocks , first it asks me for setup.h , i setup search directories and it continues to give me more problems and eventualy does not build the workspace. Even though at first i tried to make codeblocks build wxwidgets using msvc compiler , at some point i want to totaly stop using msvc and only code with codeblocks + mingw . 

The programs im using are:
codeblocks-8.02mingw-setup.exe
wxMSW-2.8.10-Setup.exe
MSVC 2008

I have read many tutorials , guides , wiki etc , they all at some point tell me what to do using makefiles . But my reason for trying to move to codeblocks is because it has very smilar interface as msvc. So having not used makefiles before , i just want to build wxwidgets by clicking build button and only setting search directories and some more settings , leaving rest to codeblocks.

With having set default compiler to use msvc 2008 , and importing
C:\wxWidgets-2.8.10\build\msw\wx.dsw
First try to build it using w32debug gives me this error:
..\..\include\wx\platform.h|196|fatal error C1083: Cannot open include file: 'wx/setup.h': No such file or directory|

Then i add
C:\wxWidgets-2.8.10\include
C:\wxWidgets-2.8.10\include\msvc
into search directories and i get
C:\wxWidgets-2.8.10\include\msvc\wx\setup.h|140|fatal error C1083: Cannot open include file: '../../../lib/vc_lib/mswd/wx/setup.h': No such file or directory|

Playing with it more , i remember getting an error saying "this file should only be included using msvc" but i had msvc as default compiler selected then.

So here i am asking for help , my aim is to create software for windows platforms using wxwidgets as library and codeblocks as development environment.
Any help is welcome and i would greatly appreciate kind and clean answers. Thanks very much for your time in advance.
Title: Re: Cannot build wxwidgets using codeblock on windows
Post by: stahta01 on October 05, 2009, 02:21:05 pm
You need to compile wxWidgets?
Did you?

NOTE: Code::Blocks is an IDE not an Compiler.

Tim S.
Title: Re: Cannot build wxwidgets using codeblock on windows
Post by: David_004 on October 05, 2009, 07:53:08 pm
I understand that to use wxwidgets , i need to first build it . I am able to build it with msvc but i cannot build it with codeblocks .
So wxwidget files are not built and thats where im having problems.

I also understand that codeblocks is an IDE not a compiler , but i cannot make it build wxwidgets library either using mingw or msvc binary files.
Title: Re: Cannot build wxwidgets using codeblock on windows
Post by: jens on October 05, 2009, 10:09:16 pm
Setting up a real C::B project for wxWidgets is not an easy task, but using a makefile to build wxWidgets for use with C::B is simple and straight forward.

See:
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef)
or very short and less detailed:
http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook#wxWidgets (http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook#wxWidgets) .