WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please hel

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
noobscratcher
Experienced Solver
Experienced Solver
Posts: 61
Joined: Tue Jul 12, 2011 2:08 pm

WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please hel

Post by noobscratcher » Tue Jul 12, 2011 2:15 pm

hello there i was just wondering how to get WxWidgets 2.8 with Code::Blocks 10.5 any idea and please dont link me to the hard to understand the meaning tutorials :P please

i have been working on this problem for almost 3weeks :(

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by Auria » Tue Jul 12, 2011 3:21 pm

We will need more information, namely your OS, and which compiler you wish to use.
"Keyboard not detected. Press F1 to continue"
-- Windows

noobscratcher
Experienced Solver
Experienced Solver
Posts: 61
Joined: Tue Jul 12, 2011 2:08 pm

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by noobscratcher » Tue Jul 12, 2011 3:26 pm

Windows 7

WxWidgets 2.8

Code::Blocks 10.5

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by Auria » Tue Jul 12, 2011 4:34 pm

You will need to choose a compiler, either MSCV or Mingw (I believe Code::Blocks supports both). In doubt you can just use Mingw, as there is a C::B download that includes Mingw.

Then you will need a build of wxWidgets. You can build manually by following http://wiki.wxwidgets.org/Compiling_wxW ... with_MinGW
After that is done you can use Code::Blocks' wxWidgets wizard

Note that you can also use CodeLite, which may be easier for you because there is a CodeLite download that includes wxWidgets pre-built
"Keyboard not detected. Press F1 to continue"
-- Windows

noobscratcher
Experienced Solver
Experienced Solver
Posts: 61
Joined: Tue Jul 12, 2011 2:08 pm

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by noobscratcher » Tue Jul 12, 2011 4:40 pm

i have codelite and i created a wxwidgets project and when i went to build the project or debug it or in any way run the standard source code it wouldn't run the standard code that comes with the project and not only that its allways around Wx.h cant not be found which is useally the general idea of the problems also found having issues with syntax as one would suspect i need some sort of fix that doesnt require alot of major major effort

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by Auria » Tue Jul 12, 2011 4:56 pm

Did you make sure to take the CodeLite build that includes wxWidgets? If you are sure and you still have problems maybe you can psot to the CodeLite forum (if you wish to continue with building wx from source you can stay here however)
"Keyboard not detected. Press F1 to continue"
-- Windows

noobscratcher
Experienced Solver
Experienced Solver
Posts: 61
Joined: Tue Jul 12, 2011 2:08 pm

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by noobscratcher » Tue Jul 12, 2011 4:58 pm

infact i would much prefer the easiest option in your opinion i just want it too work now :D

so if you could explain to me what the tutorial is for and basic idea of getting it to work with code::Blocks

but following that tutorial is very tuff when the stuff it says is not there on the websites they link or is misplaced or somewhere else even tho i followed everything or downloaded everything from the links they provided and it wont show the right things it supposed to do,etc its just safer for me to have a detailed step by step easy to understand guide from a direct member of the community then hours of problem solving :D im not saying the tutorial is bad in any way i think its great but for a *expert gui programmer* that its mostly aims towards mostly its hard for a newbie in gui development getting it all working plus is very very problem-esc dont get me wrong i love problem solving but not this kind of problem solving as such :)

edit just had a thought if possible could you tell me how one would work out how to solve these problems what kind of ideas does one have for this kind of problem solving? :) this way i dont have to keep spamming forums everytime i have a problem as bad as this one

Thanks in advance

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by Auria » Tue Jul 12, 2011 5:53 pm

In my opinion CodeLite is the easiest option, but I don't know what is the problem you are experiencing with it; I guess at least you should post the full build log.
"Keyboard not detected. Press F1 to continue"
-- Windows

noobscratcher
Experienced Solver
Experienced Solver
Posts: 61
Joined: Tue Jul 12, 2011 2:08 pm

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by noobscratcher » Tue Jul 12, 2011 5:58 pm

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "WxWidgets_wsp.mk""
----------Building project:[ WxTester - Debug ]----------

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.
mingw32-make.exe[1]: Entering directory `C:/Program Files/CodeLite/WxWidgets/WxTester'
g++ -c "C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp" -g wx-config Error: wxWidgets hasn't been found installed at 'C:\Program Files'. -D__WX__ -o ./Debug/main.o -I.
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:13:23: error: wx/wxprec.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:20:19: error: wx/wx.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:24:6: error: #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:27:22: error: wx/timer.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:28:25: error: wx/glcanvas.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:29:21: error: wx/math.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:50:21: error: isosurf.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:53:28: error: ../../sample.xpm: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:77: error: ISO C++ forbids declaration of 'wxChar' with no type
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:77: error: expected ',' or '...' before '*' token
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: In function 'void read_surface(int)':
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'FILE' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'f' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'filename' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: '_T' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'wxFopen' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:82: error: 'wxString' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:82: error: expected ';' before 'msg'
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:83: error: 'msg' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:84: error: 'wxMessageBox' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:89: error: 'feof' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:93: error: 'fscanf' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:99: error: 'wxPrintf' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:101: error: 'fclose' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: At global scope:
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:208: error: 'wxChar' has not been declared
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: In function 'GLenum Args(int, int**)':
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:214: error: '_T' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:214: error: 'wxStrcmp' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:233: error: 'wxString' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:233: error: expected ';' before 'msg'
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:234: error: 'msg' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:235: error: 'wxMessageBox' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: At global scope:
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:244: error: expected constructor, destructor, or type conversion before '*' token
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:246: error: expected constructor, destructor, or type conversion before '(' token
g++: wx-config: No such file or directory
g++: Error:: Invalid argument
g++: wxWidgets: No such file or directory
g++: hasn't: No such file or directory
g++: been: No such file or directory
g++: found: No such file or directory
g++: installed: No such file or directory
g++: at: No such file or directory
g++: 'C:\Program: Invalid argument
g++: Files'.: No such file or directory
mingw32-make.exe[1]: *** [Debug/main.o] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Program Files/CodeLite/WxWidgets/WxTester'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
32 errors, 0 warnings

noobscratcher
Experienced Solver
Experienced Solver
Posts: 61
Joined: Tue Jul 12, 2011 2:08 pm

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by noobscratcher » Tue Jul 12, 2011 5:59 pm

really hate that error :P this is Codelite btw :)

ouch67
Earned some good credits
Earned some good credits
Posts: 134
Joined: Sun Mar 23, 2008 12:09 am

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by ouch67 » Tue Jul 12, 2011 6:14 pm

you should do as it says:

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.

basically it can't find any part of wxWidgets and it's asking you to specify where it is...

DavidHart
Site Admin
Site Admin
Posts: 3925
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by DavidHart » Tue Jul 12, 2011 6:23 pm

----------Building project:[ WxTester - Debug ]----------
You have the build setting set to 'Debug'. But you have a 'release' wx build.

Try making a 'Release' build: there's a control that changes this about an inch below the top left corner of CodeLite.

noobscratcher
Experienced Solver
Experienced Solver
Posts: 61
Joined: Tue Jul 12, 2011 2:08 pm

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by noobscratcher » Tue Jul 12, 2011 6:44 pm

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "WxWidgets_wsp.mk""
----------Building project:[ WxTester - Release ]----------

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.
mingw32-make.exe[1]: Entering directory `C:/Program Files/CodeLite/WxWidgets/WxTester'
g++ -c "C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp" -O2 wx-config Error: wxWidgets hasn't been found installed at 'C:\Program Files'. -D__WX__ -o ./Release/main.o -I.
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:13:23: error: wx/wxprec.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:20:19: error: wx/wx.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:24:6: error: #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:27:22: error: wx/timer.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:28:25: error: wx/glcanvas.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:29:21: error: wx/math.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:50:21: error: isosurf.h: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:53:28: error: ../../sample.xpm: No such file or directory
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:77: error: ISO C++ forbids declaration of 'wxChar' with no type
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:77: error: expected ',' or '...' before '*' token
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: In function 'void read_surface(int)':
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'FILE' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'f' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'filename' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: '_T' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:79: error: 'wxFopen' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:82: error: 'wxString' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:82: error: expected ';' before 'msg'
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:83: error: 'msg' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:84: error: 'wxMessageBox' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:89: error: 'feof' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:93: error: 'fscanf' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:99: error: 'wxPrintf' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:101: error: 'fclose' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: At global scope:
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:208: error: 'wxChar' has not been declared
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: In function 'GLenum Args(int, int**)':
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:214: error: '_T' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:214: error: 'wxStrcmp' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:233: error: 'wxString' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:233: error: expected ';' before 'msg'
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:234: error: 'msg' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:235: error: 'wxMessageBox' was not declared in this scope
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp: At global scope:
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:244: error: expected constructor, destructor, or type conversion before '*' token
C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp:246: error: expected constructor, destructor, or type conversion before '(' token
g++: wx-config: No such file or directory
g++: Error:: Invalid argument
g++: wxWidgets: No such file or directory
g++: hasn't: No such file or directory
g++: been: No such file or directory
g++: found: No such file or directory
g++: installed: No such file or directory
g++: at: No such file or directory
g++: 'C:\Program: Invalid argument
g++: Files'.: No such file or directory
mingw32-make.exe[1]: *** [Release/main.o] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Program Files/CodeLite/WxWidgets/WxTester'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
32 errors, 0 warnings

this is what i get when i do it in release

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by Auria » Tue Jul 12, 2011 7:11 pm

Try to follow step 3 at
http://codelite.org/WxWidgets/GettingRe ... derWindows

I'm just surprised the pack that comes with wx doesn't have these settings by default
"Keyboard not detected. Press F1 to continue"
-- Windows

DavidHart
Site Admin
Site Admin
Posts: 3925
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: WxWidgets 2.8 and Code::Blocks 10.5 not working?? Please

Post by DavidHart » Tue Jul 12, 2011 7:13 pm

g++ -c "C:/Program Files/CodeLite/WxWidgets/WxTester/main.cpp" -O2 wx-config Error: wxWidgets hasn't been found installed at 'C:\Program Files'. -D__WX__ -o ./Release/main.o -I.
It looks as if you installed CodeLite into a path which contains a space. Unfortunately mingw (which CodeLite uses) is allergic to spaces.

I suggest you reinstall CodeLite elsewhere, e.g. C:/CodeLite/, then try again.

Post Reply