🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #936

Re: MACOSX CODEWARRIOR8 and cosf, sinf, tanf, sqrtf, etc

#936
From: Howard Hinnant
Date: Thu, 10 Oct 2002 20:08
44 lines
2916 bytes
In article <r6jbquknfi7ictbckllvqk0itsub5dum84@4ax.com>, News Reader
<nntp@r.us> wrote:

| 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?

There are two possible C libs you can use:  BSD C or MSL C.  Only MSL C
has std::cosf and neither have ::cosf.  The easiest way to use MSL C is
to start with the Pro 8 stationary.  It sets MSLCarbonPrefix.h as your
prefix file, arranges the paths just so, and links to the correct libs.

-- 
Howard Hinnant
Metrowerks
Technical Details
Message-ID: <101020021608219959%hinnant@metrowerks.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!newsfeed1.cidera.com!Cidera!cyclone.nyroc.rr.com!cyclone-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!not-for-mail
References: <s7h9qusl2tjo42e3egbblef5c8flaqjo28@4ax.com> <0001HW.B9CA1F2D02E8A14AF0284600@news.mindspring.com> <r6jbquknfi7ictbckllvqk0itsub5dum84@4ax.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 13:08:22 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!newsfeed1.cidera.com!Cidera!cyclone.nyroc.rr.com!cyclone-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!not-for-mail
Subject: Re: MACOSX CODEWARRIOR8 and cosf, sinf, tanf, sqrtf, etc
From: Howard Hinnant <hinnant@metrowerks.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Reply-To: hinnant@metrowerks.com
Message-ID: <101020021608219959%hinnant@metrowerks.com>
References: <s7h9qusl2tjo42e3egbblef5c8flaqjo28@4ax.com> <0001HW.B9CA1F2D02E8A14AF0284600@news.mindspring.com> <r6jbquknfi7ictbckllvqk0itsub5dum84@4ax.com>
Organization: Metrowerks
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
Mail-Copies-To: nobody
User-Agent: Thoth/1.5.5 (Carbon/OS X)
X-Face: )mY~XFHLw)UOW!W#[Ljvxq6Ja7(g'#F0-g*&puNxR8hEJkd@Oue/70^.)I78\
        (%a%&Id211u"l/t.llWo/M|?15XUlx9!IGkdWiEmcasiyg"k;Q9[~XuE+`t2"*n(>nmm
        @L/q,TjMd5+H{gASEPDR^$
Lines: 44
Date: Thu, 10 Oct 2002 20:08:19 GMT
NNTP-Posting-Host: 24.24.28.19
X-Complaints-To: abuse@rr.com
X-Trace: twister.nyroc.rr.com 1034280499 24.24.28.19 (Thu, 10 Oct 2002 16:08:19 EDT)
NNTP-Posting-Date: Thu, 10 Oct 2002 16:08:19 EDT