This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Math.h error "long double" compile flag?


Thanks Eljay,

I tried using this:

$ g++ foo.cpp -mno-cygwin -mdll -DBUILD_DLL -O3 -c -fno-exceptions
-ffast-math

and got the same errors as before.

Now in foo.cpp, I had math.h included as:
#include "c:/mingw/include/math.h"

Also the GCC version I'm using is

$ g++ --version
g++ (GCC) 3.3.1 (mingw special 20030804-1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

At this point, I'm not sure whats wrong. Any more clue?

Thanks,
- Nirav



                                                                                                                                    
                      Eljay                                                                                                         
                      Love-Jensen              To:      nirav.dalal@teradyne.com, gcc-help@gcc.gnu.org                              
                      <eljay@adobe.com         cc:                                                                                  
                      >                        Subject: Re: Math.h error "long double" compile flag?                                
                                                                                                                                    
                      02/24/2004 01:56                                                                                              
                      PM                                                                                                            
                                                                                                                                    
                                                                                                                                    




Hi Nirav,

You cannot use "-c" and "-lm" together, as the "-c" makes the "-lm"
semantically void.

You cannot use "-m96bit-long-double" and "-m128bit-long-double" together,
as they are mutually exclusive.

For C++ you should use "g++", for C you should use "gcc".

Other than that...

$ g++ foo.cpp -mno-cygwin -mdll -DBUILD_DLL -O3 -c -fno-exceptions
-ffast-math

...worked for me just fine.

$ g++ --version
g++ (GCC) 3.3.1 (cygming special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Are you using GCC/Mingw32 3.3.1?  Or 3.4.0?

--Eljay






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]