In article <1120606767.847344.21980 DeleteThis @o13g2000cwo.googlegroups.com>,
"toby" <toby DeleteThis @telegraphics.com.au> wrote:
>This question appears to have been asked before but no satisfactory
>answer was turned up by Google.
>
>I have enabled C++ on a Carbon project (using MacCarbonHeaders) and am
>finding compilation aborts with a large number of errors of the form:
>
>Error : ')' expected
>cmath.macos.h line 755 ((long double) nextafterd((double)(long double
>x),(double)(long double y)))
>
>Error : declaration syntax error
>cmath.macos.h line 756 {return nextafterd((double)x, (double)y);}
>
>This has been reported by others with CW6 & 8, and I am observing it
>with CW7. Anyone have any idea if there is a workaround/fix for this
>(other than hope for the best with 9)? I've fiddled with a few things
>such as inline settings, order of access paths, but nothing seems to
>help. I don't know if it's connected but the source files it's
>attempting to compile are named '.c' even though C++ has been enabled
>in the project settings.
I think you are using the wrong precompiled header or need to
update...Here is the FAQ
Q) I can't use math.h with the precompiled carbon MacHeaders. How can
I fix that?
A) Using the new MacHeaders for carbon builds includes Carbon.h which in
turn includes CoreServices.h, which then includes fp.h. This means that
if you use MacHeadersCarbon.h as it shipped with CW7 you won't be able
to use math.h because of a conflict. The next CodeWarrior patch should
resolve this.
--
CodeWarrior Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and our staff
--
http://www.codewarrior.com/community --
Ron Liechty - MWRon DeleteThis @metrowerks.com -
http://www.codewarrior.com