* 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
* RE: using mutex_lock / unlock with VS .NET 2003
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
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Starin @ 2004-12-17 5:30 UTC (permalink / raw)
To: pthreads-win32
Ahhh solved my own problem... had to turn off the "Use Managed Extensions"
configuration option... anyone care to explain why?
Dan
-----Original Message-----
From: pthreads-win32-owner@sources.redhat.com
[mailto:pthreads-win32-owner@sources.redhat.com] On Behalf Of Daniel Starin
Sent: Thursday, December 16, 2004 11:17 PM
To: pthreads-win32@sources.redhat.com
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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: using mutex_lock / unlock with VS .NET 2003
2004-12-17 5:30 ` Daniel Starin
@ 2004-12-17 10:29 ` Gisle Vanem
0 siblings, 0 replies; 3+ messages in thread
From: Gisle Vanem @ 2004-12-17 10:29 UTC (permalink / raw)
To: pthreads-win32
"Daniel Starin" wrote:
> Ahhh solved my own problem... had to turn off the "Use Managed Extensions"
> configuration option... anyone care to explain why?
pthreads is written in C and depends on the Win32 core API.
A VS.NET 2003 program with managed extensions (written in managed C++)
depends on the .NET API (Common Language Runtime etc.). These 2 don't
mix allthough you can use native code in a managed program.
--gv
^ 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).