G++ Help



Hi all,
would anyone be able to help me complie a g++ app that uses the
pthreads library?

Ive created a class that wraps pthreads based on a listing from a book.
Mine did not compile so now I am trying to compile the code from the
book first. I have uploaded th source to crellbar.com/pthreads/

I try "g++ -lpthread Listing1-6.cpp" and it does not work, i assume
this is because I am using the linker incorrectly or something along
those lines. I did something similar in MS VS.net where I forgot to
compile with MFC but cant find a fix for g++ with pthreads under linux.

Essentially I am asking if I am compiling the files correctly.

Cheers.
Paul.

.



Relevant Pages

  • G++ Help
    ... Ive created a class that wraps pthreads based on a listing from a book. ... Mine did not compile so now I am trying to compile the code from the ... book first. ...
    (comp.programming.threads)
  • Re: Controlling recent APC UPS via USB
    ... Pulling apcupsd from CVS resulted in a bunch of errors in and around pthreads, but I haven't gone much down that road. ... int i, rc, ci, phys; ... Without most of these changes it will fail to compile, and later, link on my 4.2 i386 box. ...
    (comp.unix.bsd.openbsd.misc)
  • Re: /beta/pth207b.zip seems to need 686+
    ... I think it turns out that GNU pthreads 2.0.7 ... I tried again with FSU Pthreads, ... Tried this too, also didn't compile p7zip. ...
    (comp.os.msdos.djgpp)
  • Re: G++ Help
    ... > Ive created a class that wraps pthreads based on a listing from a book. ... > Mine did not compile so now I am trying to compile the code from the ... Hello Paul, ... Now learn howto to create and use a Makefile. ...
    (comp.os.linux.development.apps)
  • Re: G++ Help
    ... > Ive created a class that wraps pthreads based on a listing from a book. ... > Mine did not compile so now I am trying to compile the code from the ... > book first. ... Randy Crawford http://www.ruf.rice.edu/~rand rand AT rice DOT edu ...
    (comp.programming.threads)