(*** This bug was imported into bugs.kde.org ***) Package: kdevelop Version: 2.1.1 (using KDE 3.0.1 ) Severity: normal Installed from: SuSE RPMs Compiler: Not Specified OS: Linux OS/Compiler notes: Not Specified void main() { #ifdef i386 printf("i386 set\n"); #endif } If I compile the program with KDevelop 2.1.1 I don't get any output. If I compile it directly using "g++ program.cpp" or with any prior KDevelop version it works. (Submitted via bugs.kde.org)
This is probably due to some command line arguments or additional libraries overriding this define. I just tested this on a file and it found 'i386' when I just did a 'g++ main.cpp -o main', but when I used the Makefile it went away. Alternatively you could try to use __i386 - it worked.
The fact that i386 is not defined when compiling using the Makefile is that -ansi is part of the CXXFLAGS. The right macro name that is ANSI compliant is __i386 .