This is the mail archive of the
mailing list for the pthreas-win32 project.
Re: Linking problem
- From: Divick Kishore <divick dot kishore at gmail dot com>
- To: Mats Aubell <matsemann at c2i dot net>
- Cc: pthreads-win32 at sourceware dot org
- Date: Fri, 12 May 2006 15:03:26 +0530
- Subject: Re: Linking problem
- References: <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,
Mats Aubell wrote:
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.
void * threadBehavior(void * arg)
int main(int argc, char *argv)
if (pthread_create(&m_threadBehavior, NULL, threadBehavior, NULL))
printf("Cannot create the behavior thread.\n");
I'm running WinXP and Microsoft Visual Studio 2003. Getting quite desperate
for help, so any feedback is greatly appreciated.