public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "Daniel Starin" <ds708@columbia.edu>
To: <pthreads-win32@sources.redhat.com>
Subject: using mutex_lock / unlock with VS .NET 2003
Date: Fri, 17 Dec 2004 04:16:00 -0000	[thread overview]
Message-ID: <200412170416.iBH4GPiE017610@serrano.cc.columbia.edu> (raw)

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


             reply	other threads:[~2004-12-17  4:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-17  4:16 Daniel Starin [this message]
2004-12-17  5:30 ` Daniel Starin
2004-12-17 10:29   ` Gisle Vanem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200412170416.iBH4GPiE017610@serrano.cc.columbia.edu \
    --to=ds708@columbia.edu \
    --cc=pthreads-win32@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).