This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Using fork() and pthread() OR how to link against cygwin?
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 11 Jul 2014 11:41:10 -0400
- Subject: Re: Using fork() and pthread() OR how to link against cygwin?
- Authentication-results: sourceware.org; auth=none
- References: <CANXECd454H4Nh8QtQf-2gG=s8dcmayhLxmcckKUb+0HyX+hMzg at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
On Fri, Jul 11, 2014 at 10:27:00AM -0500, Ismael Farfán wrote:
>Hello list
>
>I've been searching allover the internet for "fork gcc cygwin linker"
>and stuff like that without much look :(
>
>In my test I use pthreads, fork, waitpid, random and other POSIX
>stuff, so the linker returns "LNK2019 unresolved external symbol..."
That's not a GNU linker error message. You need to build Cygwin
programs with Cygwin tools.
>What do I have to pass the compiler to get those functions?
>
>We use the ictl (intel) compiler, but gcc hasn't worked either.
C library functions are in the in libc.a (aka libcygwin.a) but
you need to be building a cygwin program using Cygwin's gcc for
things to work properly. You can't just link in a library which
contains fork into a Windows program. That won't work.
cgf
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple