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 From: robert DOT jan DOT schutten AT philips DOT com To: Cc: Subject: RE: How to compile a .LIB with cygwin for use in MS Visual C Message-ID: <0056890022851992000002L922*@MHS> Date: Thu, 1 Mar 2001 08:49:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; name="MEMO 03/01/01 08:45:54" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id CAA22785 On 02/28/2001 18:08:41 Dautrevaux wrote: >I'm not sure of the exact procedure to follow, but at least you must use >-mno-cygwin when compiling this kind of code (and you must check the the >mingw32 support is properly installed, depending on your cygwin version). >This was already discussed a number of times on this list so e search of the >archive should provide the necessary links. This I understand, and this is also what I want. I want the final Visual C application to be independent of the cygwin dll. I have searched through the archives, and have not found the answer to my question. In the mean time I have upgrade my cygwin install to the latest net release (1.1.8), since I was still using the ancient B20 release.... This still doesn't work, though the error message is different now. After compiling with gcc -mno-cygwin it get this from the Visual C linker: --------------------Configuration: cpfspd_test2 - Win32 Release-------------------- Linking... libcpfspd-mno-cygwin.a( ) : warning LNK4078: multiple ".text" sections found with different attributes (E0000020) LINK : warning LNK4049: locally defined symbol "__iob" imported libcpfspd-mno-cygwin.a( ) : error LNK2001: unresolved external symbol __alloca Release/cpfspd_test2.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. cpfspd_test2.exe - 2 error(s), 2 warning(s) So it has changed, but it's not neccesarily better.... >In fact to interoperate with Visual-C code you MUST compile in MinGW32 mode, >not cygwin. Moreover you can ONLY share C code (that's why I say Visual-C >and not Visual-C++); gcc-generated C++ code cannot be called from >Visual-C++-compiled C++ code, nor the other way round. They cannot and would >most certainly NEVER work together. OK, I understand that. Luckily I am only using C code (not C++). So I still have the question if it is at all possible what I am trying to do. Is there some magic switch to gcc to let it compile to a format that is compatible with Visual C? -- With kind regards, Robert Jan Schutten (Robert DOT Jan DOT Schutten AT philips DOT com) - "Imagination is more important than knowledge" - Einstein - -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple