Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[CW7] odd build errors in math lib when C++ enabled

 
   Mac (Home) -> Programmer Code RSS
Next:  MSL_All-DLL_x86 problem compile from mac  
Author Message
toby

External


Since: Jul 05, 2005
Posts: 29



(Msg. 1) Posted: Tue Jul 05, 2005 4:39 pm
Post subject: [CW7] odd build errors in math lib when C++ enabled
Archived from groups: codewarrior>mac, others (more info?)

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.

--Toby
Back to top
Login to vote
toby

External


Since: Jul 05, 2005
Posts: 29



(Msg. 2) Posted: Wed Jul 06, 2005 12:52 pm
Post subject: Re: [CW7] odd build errors in math lib when C++ enabled [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

MW Ron wrote:
> In article <1120606767.847344.21980.RemoveThis@o13g2000cwo.googlegroups.com>,
> "toby" <toby.RemoveThis@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.

I'm really looking for a solution for CW7. Perhaps I can find a
workaround by avoiding the precompiled header - but it seems as if
Carbon.h unavoidably breaks math.h Sad The problem does seem confined
to C++ builds.

Thanks for the response, at least it's a known issue.

>
> --
> 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.RemoveThis@metrowerks.com - http://www.codewarrior.com
Back to top
Login to vote
MW Ron

External


Since: Jun 06, 2005
Posts: 31



(Msg. 3) Posted: Wed Jul 06, 2005 3:23 pm
Post subject: Re: [CW7] odd build errors in math lib when C++ enabled [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Login to vote
Display posts from previous:   
Related Topics:
MWRKS runtime.c causes compile errors - Hi, I've included runtime.c in a mixed C/C++ project with the "Force compile C++" option enabled. With this setting, runtime.c causes many compile errors in the assembly code sections. I browsed the file, and there are some extern "C&quo...

no chdir() in mach-o build of CW9?!? - Hi all, I've a little problem with CW9: if i start a mach-o standard C project, there seems to be no chdir() function!!! The function is defined and implemented in classic and carbon libraries, but it's no more present in the mach-o ones! Is there a..

Wanted: Programmer to build utility for Mac - Hi all, I'm an Apple IIgs fanatic that likes to use an emulator to continue working on IIgs projects. What I need is a way to connect the TCP/IP stack within the emulator that I use to the host machine's TCP/IP stack. Unfortunately the emulator author...

Bug in alloc.c? - I'm getting an infinite loop in alloc.c, which is located in MSL/MSL_C/MSL_Common/Src. This is with CW 9.5. The function is allocate_from_var_pools. There is a do/while loop that searches for a block with the required size to allocate a block of..

Multiply defined symbol: .bss - Hi, when trying to build a dll for Windows using CW9 on MacOS, I get an error message like: Link Error : Multiply defined symbol: .bss in files file1.cpp, file2.cpp The same message with the same filenames is repeated several times, but....
       Mac (Home) -> Programmer Code All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact