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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx, gcc-help@xxxxxxxxxxx                              
                      <eljay@xxxxxxxxx         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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux