delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/05/18:06:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Wed, 5 Feb 2003 18:06:39 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Why won't my files link?
Message-ID: <20030205230639.GE11184@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT GSO DOT 4 DOT 44 DOT 0302051037250 DOT 25432-100000 AT slinky DOT cs DOT nyu DOT edu> <Pine DOT OSF DOT 4 DOT 33 DOT 0302051721540 DOT 19748-100000 AT occs DOT cs DOT oberlin DOT edu>
Mime-Version: 1.0
In-Reply-To: <Pine.OSF.4.33.0302051721540.19748-100000@occs.cs.oberlin.edu>
User-Agent: Mutt/1.5.1i

On Wed, Feb 05, 2003 at 05:23:45PM -0500, Nick Miller wrote:
>Okay everyone... thank you for your help and for your feedback.  Allow me
>to attempt to clarify a little bit more...
>
>1) I am new to GCC.  I am new to C.  I had worked until Java until
>recently.
>
>2) I used the SAME io_functions.o file in both Cygwin and Linux.  This
>file was generated by a CS professor at my school using GCC.  When I use
>the
>
>gcc -o main fun.o io_functions.o main.o
>
>command (is it inappropriate to call it a command?), it works fine on
>Linux.  It did not work in Cygwin and I wrote the list to see if maybe
>someone knew of a discrepancy.
>
>The idea of some libraries being absent from the Cygwin package or my
>machine specifically sound likely... the error messages are as follows...
>
>io_functions.o(.text+0x13): In function 'read_array':
>: undefined reference to 'fopen'
>io_functions.o(.text+0x4f): In function 'read_array':
>:undefined reference to 'printf'

You need to '#include <stdio.h>' in io_functions.c.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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