PThreads with CW v8.3

PThreads with CW v8.3

Post by Geoffrey Slinke » Thu, 03 Jul 2003 08:37:39



Sorry for the cross post. I am in a hurry. I just got a Powerbook and
installed the dev tools and CW v8.3. I am leaving for an extended trip and
wanted to learn some programming on Mac OS X.

I would like to make a console app that uses PThreads. I know that PThread
is on OS X, I did a MAN pages on it and found the documentation.

Can I use Metrowerks to develop a console app using the pthread library?
How do I link PThread in?

I want the Metrowerks de* and IDE. I don't want to do make files and
gdb.

Help please.

Geoff


please email me if you post an aswer.

 
 
 

PThreads with CW v8.3

Post by Sean McBrid » Sun, 06 Jul 2003 10:24:01




Quote:> I would like to make a console app that uses PThreads. I know that PThread
> is on OS X, I did a MAN pages on it and found the documentation.

pthreads are available, but only partly in older Mac OS X versions.  But
don't trust everything in documentation.

Quote:> Can I use Metrowerks to develop a console app using the pthread library?

Yes.

Quote:> How do I link PThread in?

Make sure System.framework is in your Frameworks tab (it is by default
in Mach-O console applications).

With C++, when you include pthread headers (or several other unix
headers) wrap it like this:

extern "C"
{
    #include <pthread.h>

Quote:}


 
 
 

PThreads with CW v8.3

Post by MW Ro » Wed, 09 Jul 2003 01:49:06




Quote:>Sorry for the cross post. I am in a hurry. I just got a Powerbook and
>installed the dev tools and CW v8.3. I am leaving for an extended trip and
>wanted to learn some programming on Mac OS X.

I've been on vacation so this is probably too late to get to you.  

Quote:>I would like to make a console app that uses PThreads. I know that PThread
>is on OS X, I did a MAN pages on it and found the documentation.

>Can I use Metrowerks to develop a console app using the pthread library?
>How do I link PThread in?

What you need to do is use the BSD C library and headers instead of MSL.  

This is pretty simple to do,  just move the MSL Folder below the
/usr/include and /usr/lib and the Mac OS X Support folder.

Also if your project has a precompiled headers such as MSL MacHeaders.h
use MacHeaders.h instead.   Don't use the MSLHeaders.h

Quote:>I want the Metrowerks de* and IDE. I don't want to do make files and
>gdb.

Right you'll still use our compiler linker and de*.  We do use gdb
as the de* nub but you can do SYM file debugging.

Ron

--
           Metrowerks has moved, our new address is now
                     7700 West Parmer Lane
                       Austin, TX 78729
        Sales and Support 512-996-5300   800-377-5416    

 
 
 

1. pb with CW V8 and PalmDebugger

Hi,

I installed CW 8 (it's a full version, but a NFR one, won at Palm Source
Paris), then the 8.2 upgrade and the sdk 4.1 upgrade, but got a problem
with the palm debugger, the initialisation script and the subfolder was
not created, needed to get them from my backup of my old CW 6 folder.

do I need to install also the sdk 4.0 ? (everything else seems to work)

thanks

--
Rien ne me rsiste... Je sais tout faire... Et je le fais mieux que tout
le monde !  Faites comme moi, soyez le meilleur ! :-)

Laurent THALER
http://lthaler.free.fr

2. Game Updates

3. Problem with STL map after migration from CW Palm v8 to v9

4. Pilot SDK and HotSync

5. How many CDs in CW v8 Professional for Mac & Win ?

6. HELP: m100 Transfer

7. Can't build PowerPlant example apps with CW MacOS X edition v8

8. 5c Keyboard

9. Problems after transition from CW Palm v8 -> v9, update

10. multiple problems with cw devl studio v8 mac os x

11. CW 7 Pascal Object Modules & CW 8/9 C++?

12. Differences b/w CW 7 and CW 8

13. LIB files, CW 7 and CW 8