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: Compiling purely native (mingw) win32 apps under cygwin...


At 07:13 AM 3/28/2005, you wrote:
>Jani Tiainen wrote:
>>Larry Hall kirjoitti:
>>
>>>At 05:42 AM 3/27/2005, you wrote:
>>>
>>>>Hi all!
>>>>
>>>>I was wondering what I have to do to get purely native win32 app to build under cygwin. I know that -mnocygwin directive drops out dependency to cygwin1.dll, but how about other libraries?
>>>>
>>>>How I can make a separate sandbox for my purposes that in any case even two versions of libs exists cygwin uses only my own libs..?
>>>
>>>If you don't want or need the Cygwin layer, you can always just download,
>>>install, and use the MinGW version of gcc/g++ (see www.mingw.org).  The
>>>'-mno-cygwin' flag to the Cygwin version of gcc/g++ is meant to be a convenient option to get the same results as the MinGW version without
>>>installing a copy.  Still, if MinGW is what you want and all you ever want,
>>>you're better off using it that the Cygwin switch.
>>>
>>>If you're ever unsure about which DLLs got linked into your executable/DLL,
>>>simply run 'cygcheck <foo>', where <foo> is the executable/DLL in question.
>>>It will list all the implicitly loaded DLL dependencies.  If there are any
>>>Cygwin dependencies, you'll see them.
>>
>>Well I need Cygwin for build environment since mingw/msys package doesn't work well with automake/autoconf.
>>But still is there some special environment vars (like PKG_CONFIG_PATH) that I have to set to make things sure..?
>>And of course I use Cygwin for ssh + xorg connectivity to my Linux server...
>
>Well, according to the MinGW web site, it's very easy to work with both.  Just
>make sure the MinGW /bin is before the Cygwin /bin. 


Right.  If you have both installed, you need to manage your path so that 
they point to the "right" binaries for the job.  That's not to say that 
you have to work this way.  Using the '-mno-cygwin' switch for Cygwin's
gcc/g++ is a nice easy way to build both with and without cygwin1.dll
if that's what you need.  Using the '-mno-cygwin' flag is designed to 
exclude Cygwin libs, DLLs, and include files in favor of their MinGW
counterparts.  Just make sure you have your mingw-runtime package installed
if you plan to work this way.  It's really no more complicated than that.
If this doesn't work well, it's either a local configuration issue or a bug.


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


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