delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/01/18:01:54

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
Delivered-To: fixup-cygwin AT cygwin DOT com@fixme
From: "Paul Garceau" <pgarceau AT qwest DOT net>
Organization: New Dawn Productions
To: cygwin AT cygwin DOT com
Date: Thu, 1 Mar 2001 14:53:38 -0800
Subject: RE: How to compile a .LIB with cygwin for use in MS Visual C
Reply-to: Paul Garceau <pgarceau AT qwest DOT net>
Message-ID: <3A9E6272.2568.450AC0@localhost>
In-reply-to: <0056890022851992000002L922*@MHS>
X-mailer: Pegasus Mail for Win32 (v3.12c)

Hi folks,

On 1 Mar 2001, at 8:49, the Illustrious robert DOT jan DOT schutten AT philips DOT c wrote:

> 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?

	Ummm...not for .lib files, at least not that I am aware of.  .dlls are 
a different story.

	Peace,

		Paul G.
> 
> --
> 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
> 
> 




Nothing real can be threatened.
    Nothing unreal exists.

--
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