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: Subject: How to compile a .LIB with cygwin for use in MS Visual C Message-ID: <0056890022801794000002L942*@MHS> Date: Wed, 28 Feb 2001 16:45:14 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; name="MEMO 02/28/01 16:41:26" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id KAA07421 Hi all, I am trying to compile library using cygwin. This library compiles perfectly with gcc on various unix platforms and with the cygwin version on gcc on a MS-windows machine. Also usage of this library is working perfectly on all these platforms. Now the problem: I would like to use the compiles library as a .LIB under MS Visual C. So why don't I just distribute source code of my library so that it can be compiled with Visual C. Reason: I rely on automatic source code generation, which works with a combination of makefiles and standard unix tools. This is difficult to port to Visual C. What did I try: I tried including my library (it's called libcpfspd.a) at the linking stage of Visual C by just adding this to the line "Object/library modules" I get the following linking error: --------------------Configuration: cpfspd_test2 - Win32 Release-------------------- Linking... libcpfspd.a(cpfspd_hdr.o) : error LNK2001: unresolved external symbol __impure_ptr libcpfspd.a(cpfspd_low.o) : error LNK2001: unresolved external symbol __impure_ptr libcpfspd.a(cpfspd_low.o) : error LNK2001: unresolved external symbol __alloca libcpfspd.a(cpfspd_low.o) : error LNK2001: unresolved external symbol ___errno Release/cpfspd_test2.exe : fatal error LNK1120: 3 unresolved externals Error executing link.exe. cpfspd_test2.exe - 5 error(s), 0 warning(s) Next try: compile the library with -mno-cygwin: Following result: --------------------Configuration: cpfspd_test2 - Win32 Release-------------------- Linking... libcpfspd-mno-cygwin.a( ) : error LNK2001: unresolved external symbol ___imp__iob libcpfspd-mno-cygwin.a( ) : error LNK2001: unresolved external symbol ___imp__iob libcpfspd-mno-cygwin.a( ) : error LNK2001: unresolved external symbol __alloca Release/cpfspd_test2.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. cpfspd_test2.exe - 4 error(s), 0 warning(s) So, is it possible to compile with cygwin and use the result with Visual C, or am I asking for the impossible? -- 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