Subject: Re: Building Mingw console applications under Cygwin
From: Pavel Tsekov <[email-masked]>
To: [email-masked]
Date: Wed, 10 Oct 2001 17:10:57 +0200

Hey, Andy

The problem is the -mno-cygwin works only for C and not C++.
Look in the mailing list for more information. Better install
mingw separately and compile the program with it.

[email-masked] wrote:
> 
> Hi,
> 
> I seem to be missing a point somewhere I think. I'm trying to build a
> native Windoze console application using gcc under the Cygwin
> environment. I am using the following make options:
> 
> CXXFLAGS += -mno-cygwin
> CPPFLAGS += -I/usr/include/g++-3
> LDFLAGS += -v -mno-cygwin
> LOADLIBES += -lstdc++ -lwsock32
> 
> This gives me the following command lines and error messages when I
> compile:
> 

[ snip ]

> gcc  -v -mno-cygwin MINGWdebug/libTCP.a
> ../../../../stlplus/source/MINGWdebug/libstlplus.a  -lstdc++ -lwsock32
> -o client
> Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
> gcc version 2.95.3-5 (cygwin special)
>  /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/collect2.exe -Bdynamic
> --dll-search-prefix=cyg -o client.exe /usr/lib/mingw/crt2.o
> -L/usr/lib/mingw -L/usr/lib/w32api
> -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5 MINGWdebug/libTCP.a
> ../../../../stlplus/source/MINGWdebug/libstlplus.a -lstdc++ -lwsock32
> -lmingw32 -lgcc -lmoldname -lmsvcrt -lmingw32 -luser32 -lkernel32

[ snip ]

> collect2: ld returned 1 exit status
> make: *** [client] Error 1
> 
> I have found definitions for __errno in libmsvcrt.a (so why is that
> failing?) but I cannot find any definitions of _imp___ctype_ in any of
> the libraries in /lib/mingw.
> 
> Some version numbers in case they help:
> 
> cygwin-1.3.3-2.tar.bz2
> gcc-2.95.3-5.tar.bz2
> mingw-runtime-1.1-1.tar.bz2

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/