Author Topic: help! codeblocks and wxwidgets instalation problems  (Read 4992 times)

Offline amstag

  • Single posting newcomer
  • *
  • Posts: 5
help! codeblocks and wxwidgets instalation problems
« 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6613
    • My Best Post
Re: help! codeblocks and wxwidgets instalation problems
« Reply #1 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.
« Last Edit: November 03, 2010, 02:22:18 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline amstag

  • Single posting newcomer
  • *
  • Posts: 5
Re: help! codeblocks and wxwidgets instalation problems
« Reply #2 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6613
    • My Best Post
Re: help! codeblocks and wxwidgets instalation problems
« Reply #3 on: November 03, 2010, 02:48:06 am »
You said here
Code: [Select]
UNICODE=0 that you DID NOT use unicode!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline amstag

  • Single posting newcomer
  • *
  • Posts: 5
Re: help! codeblocks and wxwidgets instalation problems
« Reply #4 on: November 03, 2010, 02:50:09 am »
ok. so what would a noob do at this point? reinstall? recompile?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5226
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: help! codeblocks and wxwidgets instalation problems
« Reply #5 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: [Select]
UNICODE=1
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline amstag

  • Single posting newcomer
  • *
  • Posts: 5
Re: help! codeblocks and wxwidgets instalation problems
« Reply #6 on: November 03, 2010, 03:27:51 am »
no. unfortunately that didnīt work.
Any more sugestions?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: help! codeblocks and wxwidgets instalation problems
« Reply #7 on: November 03, 2010, 07:34:49 am »
Did you run "mingw32-make.exe -f makefile.gcc clean" before rebuilding wxWidgets ?

Offline cbexaminr

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: help! codeblocks and wxwidgets instalation problems
« Reply #8 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".)

Offline amstag

  • Single posting newcomer
  • *
  • Posts: 5
Re: help! codeblocks and wxwidgets instalation problems
« Reply #9 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.

cean

  • Guest
Re: help! codeblocks and wxwidgets instalation problems
« Reply #10 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6613
    • My Best Post
Re: help! codeblocks and wxwidgets instalation problems
« Reply #11 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.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org