public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* using mutex_lock / unlock with VS .NET 2003
@ 2004-12-17  4:16 Daniel Starin
  2004-12-17  5:30 ` Daniel Starin
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Starin @ 2004-12-17  4:16 UTC (permalink / raw)
  To: pthreads-win32

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-17 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-17  4:16 using mutex_lock / unlock with VS .NET 2003 Daniel Starin
2004-12-17  5:30 ` Daniel Starin
2004-12-17 10:29   ` Gisle Vanem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).