Page 1 of 1

Setting up in Code::Blocks

Posted: Sun Mar 15, 2009 12:10 am
by Disch
I've been an MSVS boy my whole life, and have been spoiled by nice IDEs that don't require you to know anything about makefiles or any of that nonsense. But now I'm diving into Kubuntu and am trying to use Code::Blocks as a replacement IDE.

Now in MSVS, once I got wx set up, all I had to do was add the directory I installed wx in to MSVS's include/lib directories one time, and in all future projects I could just #include <wx/wx.h> and it would find it and work perfectly.

I'm having trouble trying to get that same kind of setup going in Code::Blocks. I can get individual projects working by messing with their settings, but I'd have to change these settings for every new project I make. I'd like to get it to where I can just set things up once, and it will work in all future projects.

I read something about global compiler variables which seems to be what I want. ... _variables

However this page is completely Greek to me. It talks about inputting stuff like $(#variable.include) but doesn't say where I'm supposed to input it or what significance it has.

Can anyone give me a simple step-by-step process to explain this? Keep it in dummy terms, please. Remember that I know next to nothing about anything outside of VS.

I would post this on the Code::Blocks forum, but apparently you have to wait for an admin to manually activate your registration request. What a load of bunk.

Anyway, thanks in advance for any help you can give!


Posted: Sun Mar 15, 2009 1:37 am
by Auria

Code::Blocks includes a wxWidgets project wizard. By using this, you should be able to use wxWidgets quickly and painlessly.

If ever you have trouble with the wizard, you can also do it manually quite easily. It's just a matter of adding `wx-config --cxx-flags` to compile flags and `wx-config --libs` to link-time flags, provided wxWidgets is installed properly (giving you access to wx-config).

For more detailed help, I guess you'd need to post what precise problems you get, it usually doesn't need to be complicated.

Posted: Sun Mar 15, 2009 1:48 am
by Disch
I think I figured it out.

The reason the wizard wasn't working right for me before was because I was messing with the "advanced options" (which seemed pretty basic, but whatever)

Anyway I've worked out a setup that is painless.