This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using fork() and pthread() OR how to link against cygwin?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]