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]

import library link problem


I think someone here will know what I'm doing wrong from just reading
my description of the problem.  Plus, it can't hurt to have this case
study in the archive and search engine.

I'm willing to update my compiler version, but don't think it's
related to the problem.  Thanks in advance for any help.

  In researching this problem, I've found a lot of people answering
  "check the archives" for dlltool issues (mine may or may not be a
  dlltool issue), but I couldn't actually find anything in the archive
  showing the correct way to use dlltool.  Next time someone answers
  this way, perhaps it should contain a link to where the info really
  is.  (I think it's in the online cygwin manual, but that's probably
  not what everyone is referring to.)  --jeff

------------------

Cygwin-1.0 using stock compiler/binutils.  I'm having trouble linking
my stuff with an an import library (is this the correct name) created
from a .def file and a .dll, using dlltool.  It may be a problem with
my .h file, but I don't think that's it.  I'm at a loss as to where to
look next.

I'm getting a bunch of warnings, like the following, that I want to
get rid of:

Warning: resolving _glDrawBuffer by linking to _glDrawBuffer@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups


This implies that the .h file got __stdcall right:

$ nm *.o *.a | grep glDrawBuffer 
         U _glDrawBuffer@4


Here's some relavent output from
  nm `g++ --print-file-name=libopengl32.a`

ds71.o:
00000000 b .bss
00000000 d .data
00000000 ? .idata$4
00000000 ? .idata$5
00000000 ? .idata$6
00000000 ? .idata$7
00000000 t .text
00000000 ? ___imp_glDrawBuffer@4
         U __head_libopengl_a
00000000 T _glDrawBuffer@4


All the zeros worry me.  Are they a problem?  I created libopengl.a by
invoking dlltool as follows:

   dlltool --def opengl32.def \
           --dllname opengl32.dll \
           --output-lib libopengl32.a

where opengl32.dll is the standard one that comes with NT4.0, and
opengl32.def is from my predecessor.  (I think it's identical to
what's in winsup/sysdef).  Here are some of the lines:

EXPORTS
glDrawBuffer@4


winsup/sysdef/opengl32.def has a line that my .def doesn't:

LIBRARY OPENGL32.DLL

I couldn't find an explanation of what this line does.  Anyway, it
seems to be irrelavent to my problem.  is winsup/sysdef/opengl32.def a
complete .def file for the standard winNT opengl32.dll?

thanks,

-jeff

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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