Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BBA6027.DF416C76@ece.gatech.edu> Date: Tue, 02 Oct 2001 20:47:35 -0400 From: Charles Wilson X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: "Asbenson, Lyndell L" CC: "'cygwin AT cygwin DOT com'" Subject: Re: DLL Win 2000 References: <31A90D7E3560D511AC7400A0C96B2730012BF2BC AT fmsmsx59 DOT fm DOT intel DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I think you should use the Microsoft tools to turn gpib_lang_ms.obj into a dll (no, I dunno how to do that; it may not even be possible). Then use dlltool (again) to create a gcc-compatible import lib for that new dll. finally, link your app against both dlls. The problem is, MS .obj format files are NOT compatible with gcc/ld. I'm really surprised you were able to link at all. Another solution is to search the net for a tool that can convert .obj files into .o files. I do not know if such a tool exists. However, since this topic has really degenerated into a "using mingw/cygwin-gcc-mno-cygwin with MSVC" interoperability discussion, it really doesn't belong on the cygwin mailing list anymore. *Perhaps* the mingw list would be a better choice -- but the gpib card vendor's support mailing list would be the best option. --Chuck "Asbenson, Lyndell L" wrote: > > Chuck, > We are just about there, one more question. I have > a gpib-32.dll which now works properly I also have > a Microsoft C++ gpib_lang_ms.obj file which is a language > interface file. In using the -mno-cygwin I don't get any > errors but when I compile the program and run the .exe > it runs into memory violations. Is there another way of > using or compiling in language.obj object files? > Thanks, > Lyndell Lee Asbenson > > -----Original Message----- > From: Charles Wilson [mailto:cwilson AT ece DOT gatech DOT edu] > Sent: Saturday, September 29, 2001 2:52 PM > To: Asbenson, Lyndell L > Cc: 'cygwin AT cygwin DOT com' > Subject: Re: DLL Win 2000 > > Asbenson, Lyndell L wrote: > > > I have national instruments drivers for a GPIB device and all that they > > offer > > is DLLs and Language interfaces for Borland C++ or Microsoft C++. I have > > also > > look at your DLL conversion process 5 steeps. Is there any tool that will > > convert a DLL 32 bit to a static library where I could use this in the > > Cygwin > > environment? > > Sort of. You can create an gcc-style import library for the DLL (search > for help/docu on 'dlltool' for more information). This import lib will > work with both cygwin's gcc and with mingw's gcc. > > However, the odds are that any code you write must be compiled with the > 'gcc -mno-cygwin' option of cygwin's compiler, or you should just use > the mingw compiler. The reason for this is that the NI DLL *probably* > was built to depend on msvcrt.dll, not cygwin1.dll. Since both of these > provide runtime services - and you can only have one runtime lib for a > given app - your app will also have to be linked against msvcrt.dll (not > cygwin1.dll) Ergo, -mno-cygwin (or just use mingw comiler, not cygwin > compiler). You can check the dependencies of your NI DLL thus: > cygcheck my_ni_dll.dll > > --Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/