This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re[2]: Linking with .LIB files



Text item: 

     
     Okay, I've pulled together the feedback and made a few more attempts.
     
     I compile the program using:
        gcc -o simple.c
     
     and link using:
     
     link simple.o libc.a libcygwin.a libkernel32.a libuser32.a glu32.lib 
     opengl32.lib libgdi32.a /subsystem:windows /machine:i386 
     /entry:mainCRTStartup
     
     The output:
     
//f/pgming/opengl/simple$ make
link simple.o libc.a libcygwin.a libkernel32.a libuser32.a glu32.lib opengl32.li
b libgdi32.a /subsystem:windows /machine:i386 /entry:mainCRTStartup
Microsoft (R) 32-Bit Incremental Linker Version 5.00.7022
Copyright (C) Microsoft Corp 1992-1997. All rights reserved.

libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol ___CTOR_LIST
__
libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol ___DTOR_LIST
__
libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol __data_start
__
libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol __data_end__

libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol __bss_start_
_
libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol __bss_end__
simple.exe : fatal error LNK1120: 6 unresolved externals
make: *** [simple.exe] Error 25
//f/pgming/opengl/simple$
     
     I greped the contents of every .a I could find and there's no trace of a 
     __data_start__ tag anywhere.  I grep them by doing the following:
     
        mkdir out
        for x in *.a; do nm $x > out/$x; done;
        cd out
        egrep data_start *
     
     This has the advantage of telling me which file any matches are found.  It 
     worked quite well for finding _GetModuleHandleA@4.  I also checked crt0.o 
     just in case.  Maybe the compiler was suppose to generate these symbols?  
     Or maybe it's something ld understands but link doesn't?
     
     Simple.c is a very simple windows program (with a WinMain) that calls 
     OpenGL primitives.  I copied it from a companion CD of a book to use for 
     testing this out.
     
     The GNU-Win32 I'm using I pulled from 
        ftp://ftp.cygnus.com/pub/gnu-win32/latest/all.tar.gz
     
     Apparently this is b17, not b17.1.  Sounds like getting the patches to 
     b17.1 should resolve the issue of using OpenGL.  Though I'm still 
     interested in getting this to work.  (call me stubborn if you like)
     
     So, any ideas about why I'm missing these symbols and what can I do about 
     it?
     
     Thanks, for the help guy's!  I do appreciate it!
     
     Dave

Text item: External Message Header

The following mail header is for administrative use
and may be ignored unless there are problems.

***IF THERE ARE PROBLEMS SAVE THESE HEADERS***.

Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
References: <Wed, 26 Mar 97 10:42:13 PST_6@ccm.jf.intel.com>
Subject: Re: Linking with .LIB files
CC: gnu-win32@cygnus.com, colin@bird.fu.is.saga-u.ac.jp
To: David W Palmer <David_W_Palmer@ccm.jf.intel.com>
MIME-Version: 1.0
X-Mailer: Mozilla 3.01Gold (WinNT; I)
Organization: JQB Enterprises
From: Jim Balter <jqb@netcom.com>
Date: Thu, 27 Mar 1997 00:46:40 -0800
Message-ID: <333A33F0.4F58@netcom.com>
Received: from sba-ca1-24.ix.netcom.com(204.32.201.56) by dfw-ix16.ix.netcom.com
 via smap (V1.3)
     id sma025517; Thu Mar 27 02:49:47 1997
Received: (from smap@localhost)
          by dfw-ix16.ix.netcom.com (8.8.4/8.8.4)
       id CAA25617; Thu, 27 Mar 1997 02:50:13 -0600 (CST)
Received: from dfw-ix16.ix.netcom.com (dfw-ix16.ix.netcom.com [206.214.98.16]) b
y mailbag.jf.intel.com (8.8.5/8.7.3) with ESMTP id AAA23068 for <David_W_Palmer@
ccm.jf.intel.com>; Thu, 27 Mar 1997 00:59:15 -0800 (PST)
Received: from mailbag.jf.intel.com (mailbag.jf.intel.com [134.134.248.4]) by re
lay.jf.intel.com (8.7.6/8.7.3) with ESMTP id AAA28751 for <David_W_Palmer@ccm.jf
.intel.com>; Thu, 27 Mar 1997 00:56:55 -0800 (PST)
Return-Path: jqb@netcom.com
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]