Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
odd compiler behavior when compiling CB
Michael:
--- Quote from: thomas on June 27, 2006, 12:44:55 pm ---I'd go crazy if that happened every time (and compiling Code::Blocks would probably take 30 minutes).
--- End quote ---
I have got such a problem when using wxWidgets 2.6.2/2.6.3 built with GCC 3.4.5 and then building C::B with GCC 4.1.0. Less with wxWidgets built with GCC 4.0.3 and C::B with GCC 4.1.1.
And yes, building C::B, especially the contr. plugins take much more time.
Best wishes,
Michael
jmccay:
Even with the supposed 52 errors, the odd part is it seems to get built. The errors should be there when I change to -w shouldn't they.
The reason I asked about wxWidgets precompiled headers is because I don't think I am generating those when I compile the wxWidgets library becace the newest one is dated 4/19/2005. I want to create the the PCH for the wxWidgets library when I compile it. Is it possible?
jmccay:
Ok. I just recompiled with the full commind line option for logging on like Thomas suggested. Icopied and save it to a file. I searched the file for "error:", and I didn't find any instances of it. I am perplexed.
I got a "Process terminated with status 0 (14 minutes, 24 seconds)", and I think everything built. Maybe I should download & try 3.4.2? Would that make a difference?
I tried to attach the text file, but it is 830kb in size (too big).
jmccay
jmccay:
Ok, using 3.4.2, I still get a lot of warnings:
lots of: "warning: inline function 'XXX' declared as dllimport: attribute ignored"
several: "mising initializer for member 'xxx' "
Are these normal?
jmccay
thomas:
--- Quote from: jmccay on June 28, 2006, 01:15:58 am ---The reason I asked about wxWidgets precompiled headers is because I don't think I am generating those when I compile the wxWidgets library becace the newest one is dated 4/19/2005. I want to create the the PCH for the wxWidgets library when I compile it. Is it possible?
--- End quote ---
Yes, but it is neither necessary nor wise. Precompiled headers only work under certain constraints. One such constraint is that you can only use one precompiled header per compilation, and another is that the compiler options (at least most of them) must be identical.
Thus, if you precompile your wx headers beforehand, you will not get a benefit from it when precompiling your project headers. Also, you restrict yourself to always using the same compiler options everywhere (because otherwise precompiled headers are disabled).
To get the full benefits of precompilation and keep flexibility at the same time, you should use precompilation the way it is done in the Code::Blocks project.
If you still want to build precompiled headers for wxWidgets, it is really easy, just run gcc on wxprec.h or wx.h (whichever you include from your sources, preferrably wxprec.h). You have to run gcc with the same compiler options that you use later. It is possible to have several different option sets of the same header, for this you have to make a folder with the header's name plus .gch (for example wxprec.h.gch) and put the different precompiled headers (with arbitrarily chosen names) in there.
Regarding the 52 errors, this is probably a parsing bug in Code::Blocks, it incorrectly interpretes some of the warnings as errors.
Nevertheless, something is odd with what you do there. First of all, wxWidgets should not be compiled from within Code::Blocks, although it is certainly possible to get this to work, it is currently not supported (simply adding all the files to a new project will not do, wxWidgets needs a bit more than that).
I got confused because your errors/warnings show files from the Code::Blocks SDK, this led me into believing you were actually building Code::Blocks...? Are you maybe even building wxWidgets and Code::Blocks together?
Anyway, the "good" way to build wxWidgets is by using makefile.gcc in build/msw. This indeed outputs thousands of warnings, but those can safely be ignored.
Code::Blocks, on the other hand, can be built using the project file, this usually produces around a dozen warnings, most coming from wx/dnd.h, and a few from AS, those can be ignored too.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version