OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000097OMNeT++IDE / C++ developmentpublic2009-08-26 22:452010-12-10 16:14
andras 
andras 
normalminoralways
resolvedfixed 
x86WindowsXP
4.0 
4.1rc1 
0000097: gcc toolchain should #define _WIN32 when on Windows, like mingw-gcc does
Currently the gcc toolchain does not define _WIN32 like mingw-gcc does, so parsing goes on the wrong #ifdef branches.

On windows, the gcc toolchain should define all these symbols:
_WIN32, WIN32, and __WIN32__

This only affects C++ editing features: Syntax Highlighting, Content Assist, etc, and may cause false "cannot find include file" warnings to be displayed in the editor. It does NOT affect the build process.
1. create a new OMNeT++ C++ project on Windows, using the gcc toolchain (MinGW)
2. in any .cc or .h file, enter the following:
    #ifdef _WIN32
    some-win32-stuff
    #endif
3. the line "some-win32-stuff" will appear as grayed out (inactive)
No tags attached.
Issue History
2009-08-26 22:45andrasNew Issue
2009-08-29 19:06andrasDescription Updated
2009-10-09 15:35rhornigStatusnew => confirmed
2010-05-10 10:45andrasNote Added: 0000294
2010-05-10 10:45andrasStatusconfirmed => resolved
2010-05-10 10:45andrasFixed in Version => 4.1rc1
2010-05-10 10:45andrasResolutionopen => fixed
2010-05-10 10:45andrasAssigned To => andras
2010-12-10 16:14rhornigNote Added: 0000349

Notes
(0000294)
andras   
2010-05-10 10:45   
Cannot reproduce. Probably fixed in CDT.
(0000349)
rhornig   
2010-12-10 16:14   
This issue affects only the files that are not in a C++ project. I.e. header files from omnetpp do not see the defines correctly as the presence of macros depend on where these files are included from.