From: Divick Kishore <divick.kishore@gmail.com>
To: Mats Aubell <matsemann@c2i.net>
Cc: pthreads-win32@sourceware.org
Subject: Re: Linking problem
Date: Fri, 12 May 2006 09:33:00 -0000 [thread overview]
Message-ID: <44645666.4060300@gmail.com> (raw)
In-Reply-To: <446443c0.09c99bc9.0bf2.310bSMTPIN_ADDED@mx.gmail.com>
>>The 3 headers files are in the same folder and the lib file has been
added through the tools->options->projects->vc++ directories.
That is not the place where you add the linker option, instead add the
pthreadVC.lib in the project properties -> linker -> input -> additional
dependencies tab. And that should work. Which pthread*.lib to link, is
specified in the README file of pthread installation.
hope that helps,
Divick
Mats Aubell wrote:
> Hi all,
>
> I'm having problems getting the pthread library to work. I've followed the
> instructions which can be found in the faq
> (http://sourceware.org/pthreads-win32/faq.html). I have the dll file in the
> Windows catalog. The 3 headers files are in the same folder and the lib file
> has been added through the tools->options->projects->vc++ directories. When
> I compile I get this error msg:
>
> ssds error LNK2019: unresolved external symbol __imp__pthread_create
> referenced in function _main
>
> The relevant source code can be seen under.
>
> #include "pthread.h"
>
>
> void * threadBehavior(void * arg)
> {
> printf("TEST\n");
> return 0;
> }
>
>
> pthread_t m_threadBehavior;
>
> int main(int argc, char *argv[])
> {
> if (pthread_create(&m_threadBehavior, NULL, threadBehavior, NULL))
> {
> printf("Cannot create the behavior thread.\n");
> return false;
> }
> return 0;
>
> I'm running WinXP and Microsoft Visual Studio 2003. Getting quite desperate
> for help, so any feedback is greatly appreciated.
>
> Regards,
> Mats Aubell
>
>
>
>
next parent reply other threads:[~2006-05-12 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <446443c0.09c99bc9.0bf2.310bSMTPIN_ADDED@mx.gmail.com>
2006-05-12 9:33 ` Divick Kishore [this message]
2006-05-12 8:13 Mats Aubell
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=44645666.4060300@gmail.com \
--to=divick.kishore@gmail.com \
--cc=matsemann@c2i.net \
--cc=pthreads-win32@sourceware.org \
/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).