Re: G++ Help



Hi,

I tried to build your example and even before trying to link anything, your thread.cpp does not compile. You need to fix this first.

Henri

carbonrocket@xxxxxxxxx wrote:
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

  • Re: Actual Lottery Stuff. WOW eh?
    ... (Clue #1) ... I never bother to compile any project because I almost always ... I put a comment into it that tells how to fix it, ... VB5 was a major upgrade from all previous versions in that it compiles ...
    (rec.gambling.lottery)
  • Re: pointer q
    ... If you were trying to fix the code further up so it would compile what you wanted was: ... More a case of only reading part of the data with my "fix". ... Am I not reading, with correction, the number that a smaller type thinks a larger type was? ... It may have looked formatted on your machine, but here it looks a right mess, and I'm not going to try all my fonts on the off chance one uses the same spacings as whatever font you used. ...
    (comp.lang.c)
  • where are the sources :-)
    ... I can't wait to get the sources and compile for test (currently using ... >Alan started doing forward-porting of 2.4.x driver updates, ... >and USB updates. ... > o fix all the paths in ide Kconfig docs ...
    (Linux-Kernel)
  • Re: [2.6 patch] add -Werror-implicit-function-declaration to CFLAGS
    ... >> Is it my fault that you applied neither Al Viro's patches to remove the ... > That won't make powerpc compile. ... And it's my job to fix every single such bug before you'd accept ... on all architectures. ...
    (Linux-Kernel)
  • Re: [patch 07/45] v4l/dvb: Fix CI on old KNC1 DVBC cards
    ... I only saw it when trying to compile kernel 2.6.17.7. ... Edgar Hucek ... This fix does not compile on 2.6.17.7. ... Currently I am doing lots of refactoring work in the dvb tree. ...
    (Linux-Kernel)