Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / August 2005



Tip: Looking for answers? Try searching our database.

unable to compile MSL-free C++ Carbon Mach-O target

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kurt Bigler - 22 Aug 2005 07:32 GMT
I'm trying to compile using the OSX/darwin headers/libs instead of MSL in a
Carbon Mach-O target.  I made /usr/include the first item in my System
Paths, with the nested folder icon toggled ON.

I could not find a project template that seemed appropriate for this
situation from which I might get more ideas about how to change my target
settings.

I get compile errors like this one as a result of including <string> from
one of my headers:

Error   : undefined identifier '__builtin_strchr'
(included from:
bits/char_traits.h:45
string:47
Str.h:1
CCtlPane.c:7)
cstring line 107     { return __builtin_strchr(const_cast<const
char*>(__s1), __n); }

I seem to be unable to use either Sherlock or Find File or the freeware
EasyFind to succesfully find the string __builtin_strchr (by content) under
the /usr/include directory, in spite of the presence of that string in the
char_traits.h file as shown above.

Maybe __builtin_strchr is an XCode compiler intrinsic and CW doesn't support
it?  But I was pretty sure CW didn't require using MSL.

I'm using CW 9.6 under Tiger 10.4.2 with XCode 2.1 installed.

Any suggestions appreciated.  Thanks in advance.

-Kurt Bigler
Josef W. Wankerl - 22 Aug 2005 15:57 GMT
> I'm trying to compile using the OSX/darwin headers/libs instead of MSL in a
> Carbon Mach-O target.  I made /usr/include the first item in my System
[quoted text clipped - 3 lines]
> situation from which I might get more ideas about how to change my target
> settings.

Look in the examples folder on the reference CD.  There are a bunch of
sample stationery items for using BSD C instead of MSL C.
Kurt Bigler - 22 Aug 2005 23:20 GMT
>> I'm trying to compile using the OSX/darwin headers/libs instead of MSL in a
>> Carbon Mach-O target.  I made /usr/include the first item in my System
[quoted text clipped - 6 lines]
> Look in the examples folder on the reference CD.  There are a bunch of
> sample stationery items for using BSD C instead of MSL C.

Thanks for the suggestion, I hadn't thought of that.

Unfortunately it looks like there are no samples for BSD C++, only BSD C, or
a combination of BSD C and MSL C++.  It is BSD C++ that I was trying to get
to work, and I'm guessing this is just something that hasn't been worked
out.

-Kurt
Ron L - 22 Aug 2005 23:53 GMT
>>> I'm trying to compile using the OSX/darwin headers/libs instead of MSL in a
>>> Carbon Mach-O target.  I made /usr/include the first item in my System
[quoted text clipped - 13 lines]
>to work, and I'm guessing this is just something that hasn't been worked
>out.

For many various reasons CodeWarrior Compilers are not compatiable with
Darwin C++.

CodeWarrior C++ is a portable C++ implementation but the BSD is not.  If
you don't want to use MSL then try one of the public C++ Libs available.

Ron

Signature

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 - ron.liechty@freescale.com - http://www.codewarrior.com

Kurt Bigler - 23 Aug 2005 04:41 GMT
>>>> I'm trying to compile using the OSX/darwin headers/libs instead of MSL in a
>>>> Carbon Mach-O target.  I made /usr/include the first item in my System
[quoted text clipped - 9 lines]
> CodeWarrior C++ is a portable C++ implementation but the BSD is not.  If
> you don't want to use MSL then try one of the public C++ Libs available.

Makes sense, yes the darwin headers look horribly non-portable.

Thanks for the info.  Nice to have you back.

-Kurt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.