[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: difference between Cygwin & Linux GNU Make 3.8?
From: |
Paul D. Smith |
Subject: |
Re: difference between Cygwin & Linux GNU Make 3.8? |
Date: |
Mon, 30 Aug 2004 09:56:04 -0400 |
%% "Fred J." <address@hidden> writes:
fj> may be I can explain it much better.
fj> I get errors when I '$make' as below
fj> BTW; no error if I run the same in Cygwin under windows, the error
fj> happens using a linux box kernel 2.6.8 and both boxes have GNU
fj> Make 3.80
fj> //////////////////////ERROR//////////////////////////////
fj> g++ ExternalSort.cc -DNDEBUG -Wall -I../lib -L../lib
fj> -ltools -o ExternalSort
fj> ../lib/libtools.a(Tools.o)(.text+0x3416): In function
fj> `Tools::SharedLock::SharedLock[not-in-charge](_pthread_rwlock_t*)':
fj> : undefined reference to `pthread_rwlock_rdlock'
fj> //////////////////////////////////////////////////////////
I'm not sure why you think this is a problem with make.
You are not including the libraries you need, so you're getting an
undefined error from your linker. It has nothing to do with make: make
is doing exactly what you asked it to do.
On Linux, the pthread_* functions are in the pthread library, so add
-lpthread to your link line to link that in. You may or may not also
need -lrt for other realtime functions.
If you still have problems please ask on a Linux developer's newsgroup
or mailing list.
Good luck!
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist