delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/28/21:00:12

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
To: cygwin AT cygwin DOT com
From: Mirko <phaccount AT nycap DOT rr DOT com>
Subject: Re: port of linux code: linker does not find .a
Date: Fri, 28 Jan 2005 20:59:36 -0500
Lines: 43
Message-ID: <cteqm8$5hp$1@sea.gmane.org>
References: <ctc20i$lnf$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: alb-24-194-138-57.nycap.rr.com
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
In-Reply-To: <ctc20i$lnf$1@sea.gmane.org>
X-IsSubscribed: yes

Mirko wrote:
> Hi,
> 
> I am trying to compile a c code that has been developed on linux 
> (monte-carlo plasma simulation).
> 
> (Ahem, keep in mind that I am not a master programmer or linux user, so 
> I may be going a bit over my head)
> 
> The code consists of two utilities, xgrafix and xdp1.  xgrafix creates a 
>  library that xpdp1 is supposed to link to.
> 
> I managed to compile the xgrafix and generate the library (the makefile 
> uses the ar command for that).  However, when trying to link xpdp1, the 
> linker fails to recognize the xgrafix library, even though the path is 
> correct or if I move the library to the working directory.
> 
>  From browsing the cygwin mailing list I gleaned that I may in fact need 
> to create a .dll and not an .a and that the linker is failing because it 
> can link only with a dll.  Correct?So my question is three-fold:
> 
> 1) am I supposed to create a dll instead of an a(rchive)
> 2) if so, should I use the instructions in the cygwin docs regarding the 
> makings of a dll?  I ask that because in those instructions, we use gcc 
> while in the original makefile, we used ar.
> 3) Is cygwin the right environment for this?  I like to have it on my 
> pc, and would rather not have to learn to use mingw.
> 
> Thanks,
> 
> Mirko
> 
> 
Well, half an hour after posting my question, I was poking at the mingw 
site I found a link to a tutorial that mentined the -lXXX and libXXX.a 
naming convention.  Sure enough, when I applied the correct naming 
scheme the linker found the library.  I now have other issues and 
questions, but I want to tinker a bit more before coming out more questions.

Mirko

-- 
*m*irko*vukovic*-at-nycap-rr-com


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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