This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compilation - cygwin -mno-cygwin-flag


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]