www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/30/04:01:40

From: tlee AT argoneng DOT com (Tom Lee)
Subject: Newbie trying to link with .lib
30 Oct 1998 04:01:40 -0800 :
Message-ID: <36387F19.A8C24856.cygnus.gnu-win32@argoneng.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hello all:

I am running the Cygnus Win 32 B19 on my NT machine, and
I'm trying to link some code against library files from
another package with the extension .lib.  But when I try
to link with my .lib file, I still get unresolved symbols
even though I know they're in there (by using the 'nm'
command in the bash shell).  

I realize that the FAQ has an "answer" as to how to do this, 
but I don't understand the answer.  I also tried looking this 
up in the archives, but met with little success.  Is there a 
simple way for linking against .lib files (which makes sense)?
Am I missing some commands/arguments?

Things to note:

- My basic command line goes something like this:
  > gcc -I../include -L../lib TestMain.cc ../lib/patapp.lib
- I tried doing an 'nm' command in the bash shell on my
  .lib files and was successful in seeing mangled symbols,
  so I know that at least 'nm' thinks the .lib file is in
  the correct format.
- I also tried a 'ar -t' on my .lib file, and it listed all
  of the .obj files which comprise this .lib file.  But I
  don't know how to get this to link with my code.
- The FAQ makes mention of executables "LIB.EXE" and "LINK.EXE".
  I didn't get these with my Cygwin32.  Should I have?  Also,
  the FAQ talks about making a dummy LibMain and creating a
  .def file.  What does this mean, or should I even care?
- I'm new to NT; I've done 99% of my programming on Unix ;-)

Thanks in advance,
Tom Lee
tlee AT argoneng DOT com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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