User forums > Using Code::Blocks
Installed but can't compile
jsimmons:
I installed wxWidgets 2.61 and CB RC1-1, and added the wxwdidgets includ and lib folders to the directories settings. I then created a new project, and without adding anything to it other than what CB gave me, it won't compile. It can't seem to find "wx/wxprec.h".
Before today, I thought I was pretty sharp, but I can't for the life of me figure out what the heck I haven't done yet. Any help?
thomas:
You should either:
have the wx folder copied into your include folder
or better:
add the wx folder to your compiler path (Build Options --> Directories --> Compiler).
wxprec.h is inside the wx folder. You can leave it out, too, and use wx.h instead, does the same thing basically, as precompilation does not work well in gcc yet. Precompiling wx.h by hand works better for me, but the gains are minimal anyway.
EDIT:
By the way... RC1-1 comes with wx2.4 rather than wx2.6. So if you want to use wx2.6, you will need to compile wxWidgets too, to get the libaries you link with. And believe me, compiling wx can be a nuisance... there is a WiKi on the code::blocks site about that, it may be helpful.
jsimmons:
alrightie. I'll hack around some more and see what I come up with. :)
jsimmons:
--- Quote from: thomas on August 15, 2005, 12:13:43 am ---compiling wx can be a nuisance...
--- End quote ---
Has it struck anyone else that having to say this is a "bad thing" (tm)?
I'm kind of frustrated. I'm coming from Visual Studio 6 (I've been programming in C++ for the last 15 years), and I'm going to try converting over 500,000 lines of code to wxWidgets. I can't even get a simple app created in CodeBlocks to compile (even using wx 2.4). I have to say that the stuff I've found on the web is a bit convoluted. I thought I'd be able to just install Code::Blocks and get to work, but I've been chasing my tail for almost three days trying to find everything I need to get started. Am I the only one that has experienced this feeling.
I don't feel any better after having said all that, but I'll stop whining now and go back to chasing stuff around on the web... :roll:
thomas:
Do you have things like WXUSINGDLL or __GNUWIN32__ (or whatever is suitable for your project) defined? That is what made me fail the first time I tried building a wxWindows app with code::blocks.
Navigation
[0] Message Index
[#] Next page
Go to full version