Bug 43922

Summary: "i386" macro not set
Product: [Applications] kdevelop Reporter: heithecker
Component: kdevelop 2.x (obsolete)Assignee: KDevelop-Devel List <kdevelop-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: hausmann
Priority: NOR    
Version: 2.1.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description heithecker 2002-06-14 12:18:17 UTC
(*** 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)
Comment 1 Caleb Tennis 2002-10-10 19:57:30 UTC
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.  
  
  
Comment 2 Simon Hausmann 2002-10-10 20:09:24 UTC
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 .