delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/01/02:49:03

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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: <cygwin AT sources DOT redhat DOT com>
Cc: <Dautrevaux AT microprocess DOT com>
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
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019