Author Topic: Setting up code blocks so that I can compile wxwidgets programs.  (Read 36766 times)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #30 on: April 16, 2006, 12:31:32 am »
Quote
Squizz I followed the advice to copy setup.h to another directory and this solved the setup.h problem.
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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

djsbriscoe

  • Guest
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #31 on: April 16, 2006, 11:53:31 am »
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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #32 on: April 16, 2006, 04:17:01 pm »
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.
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.
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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

georgie

  • Guest
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #33 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.

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. 

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #34 on: May 18, 2006, 05:18:39 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.
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. 
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. 
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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #35 on: May 18, 2006, 08:40:49 am »
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.

What you 're missing is that the documents you 're talking about start by describing how to build a working wxWidgets installation. Feel free to ignore the parts that help you build C::B itself. All you need is a valid wxWidgets installation...
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #36 on: May 18, 2006, 09:06:38 am »
Quote
very common mantra on these forums
Quote
just does not deliver in its current state
I wonder why someone whose IP address points directly to "One Microsoft Drive, Redmond" does not use Visual Studio for development.
In fact, I wonder why we have an entire three accounts that seem to be from the same department/person. William must be very scared about what we do in our spare time.  8)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #37 on: May 18, 2006, 05:29:38 pm »
Quote
very common mantra on these forums
Quote
just does not deliver in its current state
I wonder why someone whose IP address points directly to "One Microsoft Drive, Redmond" does not use Visual Studio for development.
In fact, I wonder why we have an entire three accounts that seem to be from the same department/person. William must be very scared about what we do in our spare time.  8)

Probably because Code::Blocks doesn't take up 2GB of hard-drive space, doesn't run slowly, and is free (as in freedom).  8) 

william

  • Guest
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #38 on: May 18, 2006, 11:25:11 pm »
Looks like I rattled the hornets nest.. good!

It must be me then, because it's so intuitive to use that I can't find a single other person in all these posts who is having similiar problems to my own.  Oh wait..  I'm responding just such a thread.

Look, I would like to use code::blocks, particularly because it is cross platform, using a cross platform toolkit.  But I'm having tremendous difficulty getting anything to compile under windows with it as I stated earlier.  The fact that my employer is in Redmond Washington shouldn't exempt me from posting on these forums, it's akin to enjoying a beer but working at a health food store.  -- Give me a break.   It has no bearing on my desire to use one project over another.

As to the ease of navigation of the wiki, that's simply because you're already familiar with the hierarchy of the thing. 

Codeblocks being free does not automatically give you a shield from critique, if you believe so read the linux dev thread a time or two. 

Lastly, I don't have 3 freaking accounts.  It's likely that there are a whole 3 other people w/in the 50,000 people employed here that may have enough interest in your project to have actually signed up for an account. 

I think that covers the trolling aspect of mine and subsequent posts.




My headache has been solved by deleting my old project file and creating a new one.  Something was corrupted and I was unable to follow the many different articles to try and fix my broken project file.  - I shouldn't need to do this.. but i've had to do this with other ide's so I guess it's to be expected.

Oh, and I've a change request, if I'm allowed to make one:
This may be that I don't know how CB is handling these files, but when you want to import and xrc, but already have .cpp and .h files accompanying it.  It would be nice to have CB not overwrite the old file.  My work around has been to save off the old files, import the xrc using the same filenames, then move my old 'working' files back overwritting the new files so as to not loose my changes.  -- I've had to do this several times as CB has at times "lost" a dialog or two. 


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #39 on: May 18, 2006, 11:55:37 pm »
I think that covers the trolling aspect of mine and subsequent posts.

Someone get the hose... quickly :lol:

William, don't get over-sensitive now. Thomas' post was clearly not ill-intended.

Be patient!
This bug will be fixed soon...

sethjackson

  • Guest
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #40 on: May 18, 2006, 11:58:58 pm »
Yeah. I think Thomas meant it was cool that people from "One Microsoft Drive, Redmond" are using Code::Blocks. :D

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #41 on: May 19, 2006, 12:00:50 am »
My headache has been solved by deleting my old project file and creating a new one.  Something was corrupted and I was unable to follow the many different articles to try and fix my broken project file.  - I shouldn't need to do this.. but i've had to do this with other ide's so I guess it's to be expected.

So the actual issue wasn't being able to compile the standard Hello World template? Glad you got it cleared up. With respect to the wxSmith request, you might want to forward it to the Berlios bug tracker and/or byo, its developer, but since wxSmith is a Work-In-Progress the chances are he's already aware of the issue and/or it's been fixed or invalidated in the reworked version.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #42 on: May 19, 2006, 12:09:53 am »
William, don't get over-sensitive now. Thomas' post was clearly not ill-intended.
Lol, no way :)

It just struck me funny, in particular since we have 3 accounts, two of them having the same IP, posting in the same thread, and a third one, which only differs by having .1 as the last digit instead of .6 - which you will probably agree, is quite amusing :)
Now imagine my surprise when I looked up where they came from :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

anonymous

  • Guest
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #43 on: May 19, 2006, 12:42:23 am »
awe piss off.  i'll stick with makefiles.  don't know why where my current work contract is located has anything to do with posting here. 

Another change request: you ought to have a middle finger icon, to better express how i _feel_ right now. 

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Setting up code blocks so that I can compile wxwidgets programs.
« Reply #44 on: May 19, 2006, 12:42:10 pm »
Hello,

awe piss off.  i'll stick with makefiles.

That is your choice btw.

don't know why where my current work contract is located has anything to do with posting here. 

It has nothing to do, AFAIK.

Another change request: you ought to have a middle finger icon, to better express how i _feel_ right now. 

That's a great suggestion. Please feel free to implement it.

Best wishes,
Michael