Article View: comp.sys.mac.programmer.codewarrior
Article #933Re: MACOSX CODEWARRIOR8 and cosf, sinf, tanf, sqrtf, etc
From: News Reader
Date: Thu, 10 Oct 2002 18:53
Date: Thu, 10 Oct 2002 18:53
34 lines
2012 bytes
2012 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.
It doesn't work. I put std::cosf and it says it doesn't recognize
std.
I even put using namespace std;
Same problem...
Technical Details
Message-ID:
<u2jbqus5qbjr5b5uej1irkb7cb1caou8ti@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:53:21 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: <u2jbqus5qbjr5b5uej1irkb7cb1caou8ti@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: 36 Date: Thu, 10 Oct 2002 18:53:21 GMT NNTP-Posting-Host: 209.53.254.166 X-Trace: news0.telusplanet.net 1034276001 209.53.254.166 (Thu, 10 Oct 2002 12:53:21 MDT) NNTP-Posting-Date: Thu, 10 Oct 2002 12:53:21 MDT