User forums > Help

Setting up code blocks so that I can compile wxwidgets programs.

<< < (7/10) > >>

thomas:

--- Quote ---Squizz I followed the advice to copy setup.h to another directory and this solved the setup.h problem.
--- End quote ---
While this solves the problem for now, it is not the "good" solution.

The file setup.h contains important information related to your wxWidgets build. It is generated during the build and overwritten if you compile with different settings.

If you make a copy of that file and change any wxWidgets configuration later, then you will get strange errors which nobody will be able to understand or explain... that is a very nasty thing. Don't provoke such trouble if it is really easy to avoid.
Set the correct compiler path, and you will be fine now and in the future. Don't move or copy files, this will almost certainly lead to a disaster sooner or later.

djsbriscoe:
Hi,
Sorry but I've given up on code:blocks.
I've tried everything suggested here and I still get linker errors(unresolved references,despite 0 warnings and 0 errors reported-compiler logging enabled)
I've got rid of the copied setup.h from C:\wxWidgets-2.6.2\include\wx. It seemed to solve the problem but introduced the unresolved reference problem.
Now I have the same wx/setup.h no such file or directory problem.
I don't understand how the variables in the directory section of build options work

$(#WX.include)
$(#WX.lib)\gcc_dll$(WX_CFG)\msw
$(#WX)\contrib\include

What do the symbols mean and how do they work? They seem like a foreign language to me.
I know that Thomas says the template for wxwidgets sets up everything OK, but I want to check this for myself.

I must have done something wrong somewhere, although the build seemed to go OK.
At the moment I am just going around in circles getting knowwhere.

I am going to uninstall C:B and go back to Dev C++. Code:Blocks is a feature rich IDE but I've gotten off to a bad start with it.

Bye for now.

David.

thomas:

--- Quote ---I am going to uninstall C:B and go back to Dev C++. Code:Blocks is a feature rich IDE but I've gotten off to a bad start with it.
--- End quote ---
That is certainly your decision, but I believe that you will not be happy with Dev-CPP either. Not knowing how to set up include and linker directories is not a fall from grace. Nobody is omniscient.
But if you lack that kind of knowledge, you have to read the documentation or at least listen to what people are telling you. Otherwise, you will be lost, no matter what IDE you use.


--- Quote ---What do the symbols mean and how do they work? They seem like a foreign language to me.
I know that Thomas says the template for wxwidgets sets up everything OK, but I want to check this for myself.
--- End quote ---
For those who care to read, this is well-documented in the WiKi, as stated before. Global variables are really not that hard to understand. You use them to do the same thing as in any other IDE, too,  except that you have a lot less work and it is a lot more portable.

Thanks to Seth Jackson, the WiKi was reorganised lately, too. Thus, it is now really easy to find every  information related to application development using Code::Blocks:
http://wiki.codeblocks.org/index.php?title=Category:Application_Development

I can only repeat, setting up Code::Blocks to develop with wxWidgets is really no black art. Using the template, all you need to do (besides installing wxWidgets) is to enter a project name, and set one variable correctly.
To understand what is going on with those variables beyond using the simple template, there is a 600 words article in the WiKi.

georgie:
"It's well documented in the wiki" is a very common mantra on these forums, however, the navigation w/in that wiki is less than desired, nay, a completely frustrating experience.

And as for being able to seup include/linker directories, yes all IDE's require this, but some make it more intuitive than others.  Code::Blocks seems to have a _great_ deal of promise, but it just does not deliver in its current state. 

A much improved feature would be to see a document that does not explain how to compile code blocks itself, but rather focuses on how to get codeblocks to compile our projects.. a simple hello world project.   Nothing more, nothing less.  And this document would be placed in the "beginners start here" section.  I'd like to write it myself, but for all the dozens of times i've tried and failed to get anything to compile with Code::Blocks on windows using gcc.  (Oddly, on linux I had to change but one global variable and I was compiling with ease).  Creating my own makefiles using building with msys should not be an easier alternative for doing a build than using Code::Blocks, but sadly it is. 

TDragon:

--- Quote from: georgie on May 18, 2006, 04:01:29 am ---"It's well documented in the wiki" is a very common mantra on these forums, however, the navigation w/in that wiki is less than desired, nay, a completely frustrating experience.

--- End quote ---
Golly gee, that's awful! We'd better email the Code::Blocks devs and get them to fix this issue right away! Oh, wait a minute... it's a Wiki... isn't that one of those things where everyone in the community contributes? Well, then, we could just go in and make it better ourselves, couldn't we?

That point being made, I'll be even more contrary and say that I find navigating the Wiki to be quite simple. Three clicks take you to any mainstream article dealing with installing and using Code::Blocks -- one to get to the wiki main page, one choice from the intuitive menu layout, and one subcategory to get to the article.


--- Quote ---And as for being able to seup include/linker directories, yes all IDE's require this, but some make it more intuitive than others.  Code::Blocks seems to have a _great_ deal of promise, but it just does not deliver in its current state. 

--- End quote ---
Whoa there, pardner. Code::Blocks actually does the best job of making compiler and linker settings intuitive of any compiler out there, and, at the same time, doesn't dumb it down to a level that obscures or gives a false impression of the compilation process. For example, MSVC 6 (still very widely used, believe you me) hides the list of libraries to link as a single space-delineated text field under the generic "linker" tab of your project settings. Visual Studio 2005 is even worse for a beginner, for he must navigate a bewildering array of property pages to find it. Code::Blocks? Intuitive is its middle name. Libraries to link must be part of a project's Build Options, yes? -- So right-click on the project and select "Properties" or select it in the Project drop-down menu. From here, the "Linker" tab is visible right away, which when selected shows you a vertical list of libraries, and a nice browse button to add new ones.


--- Quote ---A much improved feature would be to see a document that does not explain how to compile code blocks itself, but rather focuses on how to get codeblocks to compile our projects.. a simple hello world project.   Nothing more, nothing less.  And this document would be placed in the "beginners start here" section.  I'd like to write it myself, but for all the dozens of times i've tried and failed to get anything to compile with Code::Blocks on windows using gcc.  (Oddly, on linux I had to change but one global variable and I was compiling with ease).  Creating my own makefiles using building with msys should not be an easier alternative for doing a build than using Code::Blocks, but sadly it is. 

--- End quote ---
In what misbegotten cave did you find the aberration of Code::Blocks that you appear to be using? I'd be more than happy to exterminate the nest of insanity that incubated it, and give the real deal a chance to thrive. Then all you'll need to do to compile a hello world sample is load the template or run the wizard, and hit the blue gear Build button.

*****

In the spirit of goodwill, feel free to ignore the previous, as my rant-meter indicator is in the red. Give some solid evidence that an out-of-the-box compilation fails, and I'm sure the devs will fix it almost before your mouse clicks the Post button. Beyond that -- it shouldn't take a document to figure out how to click New Project, run a template/wizard, and hit Build.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version