This is the mail archive of the
mailing list for the Cygwin project.
RE: Linking with .LIB files
- To: "'David W Palmer'" <David_W_Palmer at ccm dot jf dot intel dot com>
- Subject: RE: Linking with .LIB files
- From: Colin Peters <colin at bird dot fu dot is dot saga-u dot ac dot jp>
- Date: Wed, 26 Mar 1997 13:48:48 +0900
- Cc: "'GNU-Win32'" <gnu-win32 at cygnus dot com>
David W Palmer[SMTP:David_W_Palmer@ccm.jf.intel.com] wrote:
> So, I have a simple program which uses OpenGL and I link with the
> link simple.o libuser32.a glu32.lib opengl32.lib libgdi32.a
> /subsystem:windows /machine:i386
Although this may be secondary to your concerns, or in fact may be
totally off topic, I notice that libglu32.a and libopengl32.a are
both included with the beta 17.1 distribution. I'm not sure about
the header files, but if you can get your code to compile you should
be able to link it with ld. Of course this doesn't help if what you
really want is DirectX or some other thing that comes with .lib
files you can't convert to .a files.
> LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
> simple.exe : fatal error LNK1120: 1 unresolved externals
> make: *** [simple.exe] Error 25
> No .EXE is generated. And the answer is... what?
This suggests to me that you need to include crt0.o in your link line
explicitly, since that's where _WinMainCRTStartup should be resolved.
Well, actually in the Cygnus sources it's not, but you could just add
a _WinMainCRTStartup entry point which calls the _mainCRTStartup
entry point and it should work OK I think.
Sorry for the rampant uncertainty,
-- Colin Peters - firstname.lastname@example.org
-- Saga University Dept. of Information Science
For help on using this list, send a message to
"email@example.com" with one line of text: "help".