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]

Linking gnu-win32 (X11R6.3) libraries in MS-Developer (*.a -?-> *.lib)


Okay, here is my story, I'll make it short:

I like the Microsoft Visual C++ Developer Studio for writing my code and
debugging.   So, hey gnu-win32 lets me right my UNIX stuff using it,
right?   That is what it seemed like but now I have the following
annoying problem.  I am writing some code that uses the X11R6.3
libraries built for NT, and I want to link to libX11.dll.   There is a
libX11.a (which I have surmized, must have the code for loading the
required functions from the dll)... so when I do a make (in MSDEV)
everything is beautiful (no warnings or errors).  When I run, the first
call I make to an X11 routine, XOpenWindow( ) somehow jmp's to nowhere
and voila segmentation fault.   When I compile (under NT) with g++ the
code works--so it is not a bug in the library.  MSDEV is obviously not
reading libX11.a properly, right?   I notice that under Win32 all the
libraries are .lib, what is the significance of this (and if it is
significant, why doesn't MSDEV complain)?  For those that are still with
me I have included my attempts to understand the problem below.

Thanks in advance,

Tor
_______________________________________________________________________

>> What NT spews out at me when I run <<
 The instruction at "0x00030870" referenced memory at "0x00030870".  The
memory
could not be "read".

>>The reverse assembly window pops up with this<<

0003086e   ???
0003086f   ???
00030870   ???  <---- here
00030871   ???
00030872   ???
00030873   ???

>> which, after going throught it again instruction by miserable
instruction, is just after this<<

463:   if ( (display=XOpenDisplay(display_name)) == NULL )
00403b40   mov       eax,dword ptr [display_name]
00403b43   push      eax
00403b44   call      _XOpenDisplay (00409cc0)  <---- call jumps to above
arrow (why?)

>> Well, merilly skipping along the disassembly window we arrive here <<

_XOpenDisplay:
00409cc0   jmp       dword ptr [___imp_XOpenDisplay (004305e0)]

>> what is in memory at this mysterious location?<<

004305D0  000318B0
004305D4  00000000
004305D8  00000000
004305DC  00000000
004305E0  00031870    <--------- who are you and why are you here???
004305E4  00000000
004305E8  00000000
004305EC  00000000
004305F0  00031850



-
For help on using this list (especially unsubscribing), 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]