Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: Chris Faylor <cgf@cygnus.com>
Date: Thu, 20 Jul 2000 14:11:02 -0400
To: "'cygwin@sourceware.cygnus.com'" <cygwin@sourceware.cygnus.com>
Cc: b_pollard@trillium.com
Subject: Re: linking problems with posix in cygwin
Message-ID: <20000720141102.A27228@cygnus.com>
Reply-To: cygwin@sources.redhat.com
Mail-Followup-To: "'cygwin@sourceware.cygnus.com'" <cygwin@sourceware.cygnus.com>,
	b_pollard@trillium.com
References: <0E7AA454E229D411A1CB0090274661FF5502F4@gaea.trillium.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <0E7AA454E229D411A1CB0090274661FF5502F4@gaea.trillium.com>; from b_pollard@trillium.com on Thu, Jul 20, 2000 at 10:42:46AM -0700

On Thu, Jul 20, 2000 at 10:42:46AM -0700, Brian Pollard wrote:
>When trying to link many object files in Cygwin I do not know what library
>to include.  On a sun system it compiles with -lposix4.
>
>This is the line:
>gcc -o mt_acc ./ss_gen.o  ./ss_task.o  ./ss_drvr.o  ./ss_timer.o  ./ss_mem.o
>./ss_strm.o  ./ss_msg.o  ./ss_queue.o  ./ss_pack.o  ./ss_rtr.o  ./ss_acc.o
>./cm_mem.o  ./cm_bdy5.o  ./mt_ss.o  ./mt_id.o -lpthread -lposix4
>
>I finally got the -lpthread to work but still have the problem with -lposix4
>library
>
>I get errors of undefined references to "localtime_r" and "rand_r"
>
>Which library should I include from cygwin to compile, or do i need to
>create the library?

There are generally no extra libraries to load in a standard cygwin distribution;
at least as far as normal C programs are concerned.

I'm not sure where you found a libpthread.a but I doubt if it actually works
with cygwin.  Cygwin has some limited pthread support built in.

If you are getting "undefined" references, this means that the functions are not
available.  Sorry.

The sources for all of these are available, of course.  In this case you may
be able to find analogous functions in 'newlib', if you want to look into
writing your own versions.  If you do this, I hope you will consider making
the functions available to the developers at newlib@sources.redhat.com so that
we can all benefit from your work.

-Chris Faylor
-Cygwin Engineering Manager
-Red Hat, Inc.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

