Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <410-2200323515475344@M2W076.mail2web.com> X-Priority: 3 Reply-To: lhall AT rfk DOT com X-Originating-IP: 209.113.174.244 From: "lhall AT pop DOT ma DOT ultranet DOT com" To: nmiller AT cs DOT oberlin DOT edu, cygwin AT cygwin DOT com Subject: Re: Why won't my files link? Date: Wed, 5 Feb 2003 10:47:53 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-OriginalArrivalTime: 05 Feb 2003 15:47:53.0100 (UTC) FILETIME=[F1A2DCC0:01C2CD2D] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h15Fm7a03256 OK, my first suggestion is to tackle this problem the same way you would on Linux. How do you find the library or object file which contains a symbol that you want when you're on Linux? I'll give you a hint. You need to use 'nm'. 'grep' can also be handy. I get the impression that you think there is something "mysterious" going on here with Cygwin that can only be answered by having some in-depth knowledge of Cygwin or it's internals. Maybe that's true but I've seen no evidence that your problems are so rooted thus far. Forgive me if you consider this an insult but I'm wondering how much experience you have with compiling and linking programs, particularly in a GNU environment? If it's not much, then you probably want to consult web resources or a good book/tutorial on building with gcc. So far, the issues you've posted all would be well answered by such resources. This list really isn't the source for questions on basic tool operations and understanding how to resolve rudimentary problems with compiling and linking. Obviously, if your problem is more complex than that and the problem is Cygwin-specific, then this is the place to talk about it. If this is the kind of problem you have, state the details and someone here will very likely provide some feedback. Thanks, Larry Original Message: ----------------- From: Nick Miller nmiller AT cs DOT oberlin DOT edu Date: Wed, 5 Feb 2003 10:26:02 -0500 (EST) To: cygwin AT cygwin DOT com Subject: Re: Why won't my files link? Okay... I believe that I understand the stages of compiling better than was shown in the e-mail I had previously sent. Also, I included the full list of commands I have been using in the initial e-mail that I sent to the Cygwin list. Here they are below... gcc -c fun.c gcc -c main.c The above commands should make the ".o" object files... Then, I already have... io_functions.o io_functions.h fun.h Then, in main.c I am saying, #include "io_functions.h" #include "fun.h" Then, I am using this command below to do the linking... gcc -o main fun.o io_functions.o main.o So, the idea here is that I have these three files that are somewhat dependent on each other and I want to make the final executable called "main". When I do this process on a Linux machine using the same exact files, it works fine. When I do this in Cygwin, I am getting errors along the lines of "reference to undefined *thing*"... I would include the exact error messages right now, but I am not at my home computer and do not have a copy of Cygwin on this public machine to test with. Basically it looks as if my INCLUDE statements are not doing what they are supposed to, and that particular functions are not being found correctly. As I wrote before, I believe that for some reason there is some problem with file access or something... All of my files are in... C:/cygwin/home/Owner, so I would assume that the linking of the files should not be a problem. However, it seems that something is not working. I hope that this has clarified my problem(s). Please let me know if you have additional suggestions. Thank you so much! Nick -- 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/ -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . -- 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/