Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » BUG?: .cpp local typedefs mess up /w BLITZ$
BUG?: .cpp local typedefs mess up /w BLITZ$ [message #31119] Sun, 06 February 2011 10:16 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi guys

i'm getting compilation errors when using blitz enabled in a szenario like the one in attachment.

i always thought cpp local typedefs were what they are.
blitz seems to mess them up intrenally.

compile w/ blitz -> error (i.e. msc9, shared)
compile w/o blitz -> ok..

same for GCC

any idea?

Re: BUG?: .cpp local typedefs mess up /w BLITZ$ [message #31120 is a reply to message #31119] Sun, 06 February 2011 14:48 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

kohait00 wrote on Sun, 06 February 2011 10:16

hi guys

i'm getting compilation errors when using blitz enabled in a szenario like the one in attachment.

i always thought cpp local typedefs were what they are.
blitz seems to mess them up intrenally.

compile w/ blitz -> error (i.e. msc9, shared)
compile w/o blitz -> ok..

same for GCC

any idea?

Hi kohati,

You are right, typedef should work only in scope where it is defined, that is single file if it is at global level. The problem is how the files are combined when using BLITZ. Since typedef can't be "undone", it is impossible for BLITZ to solve such situation.

There are two simple solutions you can try (simple==not requiring to rewrite half of your program Smile )
1) Use macros for the same effect: "typedef int _MyType_;" -> "#define _MyType_ int"
2) Switch BLITZ off for the files where you use this by adding "#pragma BLITZ_PROHIBIT"

Hope that helps,
Honza
Re: BUG?: .cpp local typedefs mess up /w BLITZ$ [message #31126 is a reply to message #31120] Sun, 06 February 2011 19:26 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
Thats apity.this has to become a portable package.and the typedef itself is part of a define macro.so i have to rethink the modell.
Thanks a lot it clears up where to go.
Previous Topic: Custom build steps includes
Next Topic: using namespace system
Goto Forum:
  


Current Time: Fri Mar 29 16:58:35 CET 2024

Total time taken to generate the page: 0.01230 seconds