This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
using mutex_lock / unlock with VS .NET 2003
- From: "Daniel Starin" <ds708 at columbia dot edu>
- To: <pthreads-win32 at sources dot redhat dot com>
- Date: Thu, 16 Dec 2004 23:17:27 -0500
- Subject: using mutex_lock / unlock with VS .NET 2003
Hi,
The following code compiles and links but fails with the following exception
when I run the .exe. (I link to pthreadVC1.lib)
Unhandled Exception: System.TypeLoadException: Could not load type
pthread_mutex_t_ from assembly pthreadtest, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null.
at main()
Any suggestions??
Thanks,
Dan
-------------------------------------
#include <pthread.h>
#include "winsock2.h"
#include <stdio.h>
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
int main () {
pthread_mutex_lock(&mutex);
printf("hello");
pthread_mutex_unlock(&mutex);
return 0;
}