Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4366] Re: cmath.h

Date2004-03-18 02:32
From"Michael Gogins"
Subject[CSOUND-DEV:4366] Re: cmath.h
Are you including "cmath" or "cmath.h?"

The std namespace uses "cmath" with the ".h", so if you are including
"cmath.h" in the H directory I don't see how that could cause a problem.

If you have installed boost, there is a cmath compatibility file among the
boost headers that could conceivably conflict with
/usr/include/c++/3.3.1/cmath, but I don't think even this would cause a
problem.

So I don't think there's a need to rename the file.

What exactly is your error message?

============================================
Michael Gogins
gogins at pipeline period com
Irreducible Productions
============================================


----- Original Message ----- 
From: "steven yi" 
To: "Csound Developers Discussion List" 
Sent: Wednesday, March 17, 2004 9:09 PM
Subject: [CSOUND-DEV:4365] cmath.h


> Hi all,
>
> I'm running into strange errors trying to get Csound5 compiled on Cygwin
> using -mno-cygwin and SCons.  I'm not absolutely positive yet, but I
> think that the cmath.h file in the H directory might be conflicting
> somewhat with the cmath that is used in the c++ std library.  I thought
> it might be due to the order of include paths and am still investigating
> it.  (It's strange to me that this is the first time it's come up for me
> in a compile, it could very well be my cygwin/mingw setup).
>
> Regardless though, should we change cmath.h and cmath.c to something
> that isn't taken by a standard library? (maybe csoundMath.h,
csoundMath.c?)
>
> Thanks,
> steven
>

Date2004-03-18 03:20
Fromstevenyi
Subject[CSOUND-DEV:4367] Re: cmath.h
Hi Michael,

I'm not on the winXP computer at the moment, but it was happening when
compiling widgets.cpp.  It was complaining of things being undefined,
for example "::atanl" (which was weird considering the file has it as
std::atanl).  I'm actually not including cmath.h; it was being included
from fstream and some other files.  I do not think Boost is installed on
that computer but will check again tomorrow.

Another strange thing was that if I changed the include directory order
to have /usr/include and /usr/local/include before ./H, I started
getting errors that other things weren't being defined from H/cmath.h.  

If I compile with cygwin regularly there are no compilation problems but
I then get errors when linking in fltk which I've compiled with
-mno-cygwin (as expected).  

Apologies I can't be more explicit as I'm not on that machine at the
moment.  I'll spend more time looking at it tomorrow. 

steven



On Wed, 2004-03-17 at 18:32, Michael Gogins wrote:
> Are you including "cmath" or "cmath.h?"
> 
> The std namespace uses "cmath" with the ".h", so if you are including
> "cmath.h" in the H directory I don't see how that could cause a problem.
> 
> If you have installed boost, there is a cmath compatibility file among the
> boost headers that could conceivably conflict with
> /usr/include/c++/3.3.1/cmath, but I don't think even this would cause a
> problem.
> 
> So I don't think there's a need to rename the file.
> 
> What exactly is your error message?