Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > gcc "complex types" error with <math.h>

gcc "complex types" error with <math.h>
Thread Tools
warnergt
Forum Regular
Join Date: Aug 2001
Location: PA
Status: Offline
Reply With Quote
May 6, 2005, 08:54 PM
 
I recently updated my XCode tools. Now, when I compile
with gcc (gcc-3.3), I get an error with a file that includes <math.h>.

Here is the offending code in /usr/include/architecture/ppc/math.h

#ifdef __APPLE_CC__
#define complex _Complex
extern double cabs ( double complex );
#undef complex
#else

Here is the error message:
In file included from /usr/include/math.h:26,
from c/xxxxx.c:114:
/usr/include/architecture/ppc/math.h:506: error: ISO C90 does not support complex types


Anybody know why I'm getting this problem?
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
May 6, 2005, 09:41 PM
 
Yeah; the C90 standard doesn't support complex types.

Try this gcc flag:

-std=c99

and see if that makes it go away.
[Wevah setPostCount:[Wevah postCount] + 1];
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:14 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,