Code::Blocks Forums

User forums => Help => Topic started by: amstag on November 03, 2010, 01:36:36 am

Title: help! codeblocks and wxwidgets instalation problems
Post by: amstag on November 03, 2010, 01:36:36 am
Sorry for being a noob but i´m having a hard time installing wxwidgets for codeblocks, even after looking up similar posts.

System: Win7 x64

This is what i did, following http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef and http://wiki.wxwidgets.org/CodeBlocks_Setup_Guide
1 - downloaded and installed "codeblocks-10.05mingw-setup.exe"
2 - set win path "C:\Program Files (x86)\CodeBlocks\MinGW\bin"
3 - opened a DOS prompt and entered the command: mingw32-gcc, witch replied 'no input files' (everything ok)
4 - being the first time using codeblocks i created a "hello world" project, that built and ran with no problems.
5 - downloaded and executed wxWidgets Source "wxMSW-2.9.1-Setup.exe"
6 - opened console and typed "mingw32-make.exe -f makefile.gcc clean"
7 - opened console and typed "mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0"

well, after these steps i,
1 - opened codeblocks again and created new wxwidgets project
2 - chose preferred GUI builder wxform builder
3 - chose frame based application type
4 - defined wx's location (C:\wxWidgets-2.9.1)
5 - didn't change compiler options
6 - in the wxwidgets library settings chose all three first options
7 - bang! "A matching debug configuration cannot be found in the wxwidgets directory you specified. This means that debug target of your project will not build. Sure you want to proceed with these settings?"
8 - clicked yes (i don´t know...maybe it will work...)
9 - bang 2! "A matching release configuration cannot be found in the wxwidgets directory you specified. This means that release target of your project will not build. Sure you want to proceed with these settings?"
9 - clicked yes (i don´t know... whatever...)
10 - project files created, but ...
11 - bang 3! "error wx/setup.h: no such file or directory" 50+ compiling errors!

the compiling errors were all of the type ""wxUSE **** must be defined, please read comment near the top of this file."
the comments were:
"If you get an error saying "wxUSE_FOO must be defined", it means that you
    are not using the correct up-to-date version of setup.h. This happens most
    often when using svn or daily snapshots and a new symbol was added to
    setup0.h and you haven't updated your local setup.h to to reflect it. If
    this is the case, you need to propagate the changes from setup0.h to your
    setup.h and, if using makefiles under MSW, also remove setup.h under the
    build directory (lib/$(COMPILER)_{lib,dll}/msw[d][dll]/wx) so that it
    the new setup.h is copied there."

well, there are a lot of setup.h files in my codeblocks directory, and i can´t figure out witch one to change/delete.
So i am sort of stuck!
Can anyone help a noob that writes long posts?
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: stahta01 on November 03, 2010, 02:20:14 am
6 - in the wxwidgets library settings chose all three first options

Please list all the options you choose; since this where all the newbie do the wrong thing.

Is there a reason you built an ANSI build of wxWidgets; but told Code::Blocks to look for an NON-ANSI/Unicode build?

Tim S.
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: amstag on November 03, 2010, 02:43:20 am
the options in wxwidgets library settings are:
 - use wxwidgets dll
 - wxwidgets is built as a monolithic library
 - enable unicode

concerning the ANSI build, i just followed the guides i referred to in my first post.
These setup guides are somewhat complicated, so i just follow the instructions even when they don´t make a lot of sense.
Are you saying i misunderstood a step?
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: stahta01 on November 03, 2010, 02:48:06 am
You said here
Code
UNICODE=0
that you DID NOT use unicode!

Tim S.
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: amstag on November 03, 2010, 02:50:09 am
ok. so what would a noob do at this point? reinstall? recompile?
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: ollydbg on November 03, 2010, 02:53:48 am
ok. so what would a noob do at this point? reinstall? recompile?
I suggest you should rebuild the wxWidgets by enable the unicode.

Code
UNICODE=1
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: amstag on November 03, 2010, 03:27:51 am
no. unfortunately that didn´t work.
Any more sugestions?
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: Jenna on November 03, 2010, 07:34:49 am
Did you run "mingw32-make.exe -f makefile.gcc clean" before rebuilding wxWidgets ?
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: cbexaminr on November 03, 2010, 10:30:35 am
On my system, the setup.h is part of the wxwidgets directory tree, not the codeblocks directory tree.

Did you include the appropriate c:\wxwidgets-2.9.1\lib\<some_gcc_vers>\msw directory in the codeblocks include paths configuration?

(In my case, when defining the 'wx' global variable, I have also filled in the 'lib' field, not just the 'base' field.  Might be worth a try.  In one of my 'project options' configurations (I'm fairly newbie too, don't have many projects), I note there is an entry in the 'Search directories' tab,
"$(#wx)\lib\gcc_dll\msw", and I know from the wxwidgets install.txt that setup.h should be found at
"$(#wx)\lib\gcc_dll\msw\wx\setup.h".)
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: amstag on November 03, 2010, 12:19:33 pm
Ii ran "mingw32-make.exe -f makefile.gcc clean" prior to rebuilding, i i then tried cbexaminr suggestions.
Neither worked.
Reading again the guides i noticed they mentioned a wxpack file that avoided setting all these parameters.
So i uninstalled wxwidgets and ran wxpack.
After selecting gcc for the wx build everything works! No need for global variables! i just had to specify wx directory (in my case was C:\SourceCode\Libraries\wxWidgets2.8).
Just surprised for the 1.4Gb install required (!!!).
Thanks anyway for all the tips.
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: cean on November 05, 2010, 12:23:49 pm
hi,

I built wxWidget with "make -f makefile.gcc" under msw.
which options in wxwidgets library should i choose?

I get errors like "wx/setup.h: No such file or directory" My "search directories" under "Project build options" is "c:\wxWidgets-2.9.1\lib\gcc_dll\mswud"

Thx
Title: Re: help! codeblocks and wxwidgets instalation problems
Post by: stahta01 on November 05, 2010, 01:00:45 pm
mswud = Unicode and Debug (IIRC, Look under advanced for Debug)

wxWidgets defaults to MultiLib NOT to Monolithic.

Tim S.