This is the mail archive of the
mailing list for the pthreas-win32 project.
Building with MSVC
- To: 'Pthreads-win32' <pthreads-win32 at sourceware dot cygnus dot com>
- Subject: Building with MSVC
- From: Erik Hensema <erik dot hensema at group2000 dot nl>
- Date: Wed, 27 Oct 1999 11:53:25 +0200
I'm new to MSVC 6.0, and I'm trying to build pthread.dll with cl and nmake.
Compiling is no problem, but linking fails with and undefined reference to
_beginthreadex and _endthreadex. According to the MSVC documentation, these
functions should be in msvcrt.lib and libcmt.lib, however, linking with /MD
or /MT doesn' work.
I've created this makefile:
OBJ=attr.obj cancel.obj cleanup.obj condvar.obj create.obj dll.obj errno.obj
exit.obj fork.obj global.obj misc.obj mutex.obj private.obj
sched.obj semaphore.obj signal.obj sync.obj tsd.obj
OPT=/I. /c /GD
del *.dll *.obj
cl /Fepthread.dll /LD /MT $(OBJ) /link /def:pthread.def
cl $(OPT) attr.c