This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]