delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/05/15:44:57

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <4898AD8B.DD814981@dessent.net>
Date: Tue, 05 Aug 2008 12:44:11 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: compilation - cygwin -mno-cygwin-flag
References: <1217938789 DOT 559f6e7cm1kogler AT edu DOT uni-klu DOT ac DOT at>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Marian Kogler wrote:

> I don't know what I should link in addition to the allready linked libraries.
> What do the warnings mean?
> I hope that someone of you can help me.

Using -mno-cygwin switches the compiler into MinGW personality mode. 
You cannot mix and match Cygwin and MinGW libraries.  If you use
-mno-cygwin then you must ensure that *all* libraries that any component
of your software links with were built as MinGW libraries.  You can't
let any Cygwin libs enter the equation.  Your LIBS indicates quite a few
things that you must rebuild:

-lpthread -lcurl -lcurlpp -lboost_thread-gcc-mt -lboost_regex-gcc-mt
-lstdc++ -lws2_32 -lxml2 -lssl -lcrypto 

You can't use the Cygwin libcurl, you must build your own MinGW
libcurl.  You can't use Cygwin's openssl, you must build a MinGW
openssl.  You can't use Cygwin's boost, you must build a MinGW boost. 
You can't use Cygwin's pthreads implementation, you must build
pthreads-win32.  If you built curlpp for Cygwin you must rebuilt it for
MinGW.  You can't use Cygwin's libxml2, etc.  And not only do you have
to rebuild all these libraries, you have to make sure that gcc finds the
rebuilt ones (using appropriate -I and -L) and never tries to use the
Cygwin system ones.

See the problem with -mno-cygwin?  It is not something that you can use
lightly, it means you are using a completely different platform for your
software, i.e. *no*Cygwin.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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