Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Strange build error only after changing
Re: Strange build error only after changing [message #13838 is a reply to message #13833] |
Tue, 29 January 2008 16:11   |
 |
mirek
Messages: 14266 Registered: November 2005
|
Ultimate Member |
|
|
cbpporter wrote on Tue, 29 January 2008 08:35 |
luzr wrote on Tue, 29 January 2008 14:04 |
IMO, you have wrong #includes for .iml.
You should include iml_header.h in header file and iml_source.h in .cpp.
|
Thank you!
That solved the problem. I even created a separate .cpp only for <Draw/iml_sources.h>. Since when do you need to include separate files int the .h and .cpp? I never had any problems with just using <Draw/iml.h> since I started using U++.
|
iml.h is just doing both _header and _source. So you can really use it for a single .cpp file and better put it into .cpp...
Think about _header as variable declaration ("extern") and _source as definition.
Quote: |
I think it's quite ironic that in order to increase your compilation speed you need to do the exact opposite of what you learned about C++: if you minimize you .h dependencies, you compilation speed could improve.
|
Actually, it really does not matter that much.... (BLITZ will work with "sparse headers" model quite will too). But it is the most straightforward way.
Quote: |
Just a question: is BLITZ partially responsible for the big binary size? It would seem that it makes it rather difficult to generate small obj files.
|
Yes. That is why for release mode, BLITZ is not recommended.
Actually, I have started to consider inverse-BLITZ technique for release mode - one that would split .cpp files by functions 
(In theory, this should work with GCC and Linux with -ffunction-sections. In practice, it does not).
Mirek
|
|
|
Goto Forum:
Current Time: Fri Jul 18 13:53:31 CEST 2025
Total time taken to generate the page: 0.04086 seconds
|