delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/07/11/11:41:39

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to
:content-transfer-encoding; q=dns; s=default; b=KxubuW9uBsZx5DwR
jjaYNrnaNGtHn4+UUZLE8ExUex4qLQleEJ0NisDXVDH9062iaUAHv0zz9wDqMIuY
9niJiXBJydUsADxuu1Zets/YJ1FU1qWPyGb2G652cAO9krh9FCV8yqc2PZBiF8o2
Pfi/pBDF3+1/fGEt26DJstOZlu8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to
:content-transfer-encoding; s=default; bh=GeJTHu1f2RueFeH9xzQRiG
k3XYw=; b=AM5olqo1JVtzLrBgztZ7tLvYFSukW75UVl+hyoFMU6el/OAMgKzzaH
MT3k0JpCbB3e2SQMWDKf/frPh5SalEsqXQPGJpSwQ+LhIqWML/Dm5p1zBsNI9lrL
D5uAckKAxekQxqNt60b6NU59W6GYA1GC9Q3fMdtBGQcx/4lJFIX/0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mho-01-ewr.mailhop.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1+0xCwuvlxz4gpeeJhgfmZy
Date: Fri, 11 Jul 2014 11:41:10 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Using fork() and pthread() OR how to link against cygwin?
Message-ID: <20140711154110.GA2801@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CANXECd454H4Nh8QtQf-2gG=s8dcmayhLxmcckKUb+0HyX+hMzg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CANXECd454H4Nh8QtQf-2gG=s8dcmayhLxmcckKUb+0HyX+hMzg@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s6BFfYcW028559

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019