This is the mail archive of the
mailing list for the pthreas-win32 project.
The makefile for nmake
- To: 'Pthreads-win32' <pthreads-win32 at sourceware dot cygnus dot com>
- Subject: The makefile for nmake
- From: Erik Hensema <erik dot hensema at group2000 dot nl>
- Date: Wed, 5 Jan 2000 12:17:46 +0100
I see my version of the makefile for MS nmake is to be included in the new
snapshot, but it contains an error:
pthread.dll: $(OBJ) pthread.def
cl /LDd /Zi *.obj /Fepthread.dll \
/link /nodefaultlib:libcmt \
This links the DLL to msvcrt.lib. The last two lines can be replaced by the
/MD switch, which does the same.
cl /W3 /MT /nologo /Yd /Zi /I. \
This links to libcmt.lib using /MT (yes, AFAIK even during a compile! in any
case, the /MT switch is inconsistent which the link command above).
Libcmt is the statically linked thread-safe c-lib, and msvcrt.lib is the
dynamically linked thread-safe c-lib. Since using a DLL will save memory (it
can be shared between processes static libs CAN'T be shared), i suggest
using msvcrt. I've been using it with pthreads-win32 for some months now
without any glich.
Also, the link command includes "*.obj" which should be "$(OBJ)".
Here's the diff:
< cl /LDd /Zi *.obj /Fepthread.dll \
< pthread.def \
< /link /nodefaultlib:libcmt \
> cl /LDd /Zi /MD $(OBJ) /Fepthread.dll pthread.def
< cl /W3 /MT /nologo /Yd /Zi /I. \
> cl /W3 /MD /nologo /Yd /Zi /I. \