From: aamodt AT accessv DOT com (Tor M. Aamodt) Subject: Linking gnu-win32 (X11R6.3) libraries in MS-Developer (*.a -?-> *.lib) 27 Sep 1997 11:08:50 -0700 Message-ID: <342D49A4.E2F14F04.cygnus.gnu-win32@accessv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com 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 AT cygnus DOT com" with one line of text: "help".