Article View: comp.sys.mac.programmer.codewarrior
Article #934Re: MACOSX CODEWARRIOR8 and cosf, sinf, tanf, sqrtf, etc
From: News Reader
Date: Thu, 10 Oct 2002 18:57
Date: Thu, 10 Oct 2002 18:57
32 lines
2000 bytes
2000 bytes
On Wed, 9 Oct 2002 18:00:13 -0700, Derek Ledbetter
<derekledbetter@mindspring.com> wrote:
>On Wed, 9 Oct 2002 17:11:20 -0700, News Reader wrote
>(in message <s7h9qusl2tjo42e3egbblef5c8flaqjo28@4ax.com>):
>
>> What must I do to be able to use cosf, sinf, tanf, etc in Codewarrior8
>> on MacOSX for a MacOSX target? Am I missing a define somewhere?
>>
>> I tried this:
>>
>> test.cpp:
>> #include <cmath>
>> void test()
>> {
>> cosf(0.32342f);
>> }
>>
>>
>> In the project settings, I have the standard /usr/include path, the
>> MSL dir, and the MacOSX support dir.
>>
>> It says it can't find cosf, but doing a search in MSL's cmath header
>> file, I see it there...
>
>Since you included <cmath> instead of <math.h>, cosf is in the std
>namespace.
As well, I tried just including <math.h> and it still says can't find
'cosf'.
Am I missing a define somewhere?
Technical Details
Message-ID:
<r6jbquknfi7ictbckllvqk0itsub5dum84@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!news0.telusplanet.net.POSTED!53ab2750!not-for-mailReferences:
<s7h9qusl2tjo42e3egbblef5c8flaqjo28@4ax.com> <0001HW.B9CA1F2D02E8A14AF0284600@news.mindspring.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bcce,42d92dc96528dba3 X-Google-Attributes: gid10bcce,public X-Google-Thread: f635e,42d92dc96528dba3 X-Google-Attributes: gidf635e,public X-Google-ArrivalTime: 2002-10-10 11:57:16 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!news0.telusplanet.net.POSTED!53ab2750!not-for-mail From: News Reader <nntp@r.us> Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac Subject: Re: MACOSX CODEWARRIOR8 and cosf, sinf, tanf, sqrtf, etc Message-ID: <r6jbquknfi7ictbckllvqk0itsub5dum84@4ax.com> References: <s7h9qusl2tjo42e3egbblef5c8flaqjo28@4ax.com> <0001HW.B9CA1F2D02E8A14AF0284600@news.mindspring.com> X-Newsreader: Forte Agent 1.92/32.572 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 34 Date: Thu, 10 Oct 2002 18:57:16 GMT NNTP-Posting-Host: 209.53.254.166 X-Trace: news0.telusplanet.net 1034276236 209.53.254.166 (Thu, 10 Oct 2002 12:57:16 MDT) NNTP-Posting-Date: Thu, 10 Oct 2002 12:57:16 MDT