Author Topic: help about using C:B with cygwin.  (Read 5236 times)

wslmwps2008

  • Guest
help about using C:B with cygwin.
« on: July 21, 2008, 05:13:47 pm »
Hi, all.

I try to build pure win32 executable applications. I setup the C:B following the article "Installing Cygwin Compilerhttp://wiki.codeblocks.org/index.php?title=Installing_Cygwin_Compiler". 
A simple "hello world" program is used to test my setup. it works (compling and building )quite fine. however, when i'm using the building option " -mno-cygwin" to the project.  it shows a lot of errors.
can any one help me about this? thx a lot~

The more, is there good way that to build a pure native win32 application ? i mean the application should not depend on "cygwin1.dll". i have to use cygwin as i'm using several 3-th party libs, such as GMP, CGAL,Boost..

Code
-------------- Build: Debug in hello ---------------

g++.exe -Wall -fexceptions  -g -v -H -mno-cygwin  -W   -Id:\cygwin\usr\include  -c D:\home\hello\main.cpp -o obj\Debug\main.o
Reading specs from /usr/lib/gcc/i686-pc-mingw32/3.4.4/specs
Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/cc1plus.exe -quiet -v -Id:\cygwin\usr\include -H -D__MSVCRT__ -D__MINGW32__ -DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -DWINNT -idirafter /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api -idirafter /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib/../../include/w32api D:\home\hello\main.cpp -quiet -dumpbase main.cpp -mno-cygwin -mtune=pentiumpro -auxbase-strip obj\Debug\main.o -g -Wall -W -version -fexceptions -o /cygdrive/c/DOCUME~1/schan/LOCALS~1/Temp/ccIq327f.s
ignoring nonexistent directory "/usr/local/include/mingw"
ignoring duplicate directory "/usr/include/mingw"
ignoring duplicate directory "/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 d:/cygwin/usr/include
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/backward
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include
 /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api
End of search list.
GNU C++ version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) (i686-pc-cygwin)
compiled by GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
. /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iostream
.. /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/c++config.h
... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/os_defines.h
.. /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/ostream
... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/ios
.... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iosfwd
..... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/c++locale.h
...... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/clocale
....... d:/cygwin/usr/include/locale.h
........ d:/cygwin/usr/include/_ansi.h
......... d:/cygwin/usr/include/newlib.h
......... d:/cygwin/usr/include/sys/config.h
.......... d:/cygwin/usr/include/machine/ieeefp.h
...... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstring
....... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstddef
........ /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
....... d:/cygwin/usr/include/string.h
........ d:/cygwin/usr/include/sys/reent.h
......... d:/cygwin/usr/include/_ansi.h
......... d:/cygwin/usr/include/sys/_types.h
.......... d:/cygwin/usr/include/sys/lock.h
.......... /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
........ /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
........ d:/cygwin/usr/include/sys/string.h
...... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstdio
....... d:/cygwin/usr/include/stdio.h
........ /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
........ /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stdarg.h
........ d:/cygwin/usr/include/sys/types.h
......... d:/cygwin/usr/include/machine/_types.h
......... /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
......... d:/cygwin/usr/include/machine/types.h
......... d:/cygwin/usr/include/sys/features.h
........ d:/cygwin/usr/include/sys/stdio.h
......... d:/cygwin/usr/include/sys/cdefs.h
..... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/c++io.h
...... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/gthr.h
....... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/gthr-default.h
........ d:/cygwin/usr/include/errno.h
......... d:/cygwin/usr/include/sys/errno.h
........ /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/_mingw.h
..... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cctype
...... d:/cygwin/usr/include/ctype.h
..... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stringfwd.h
..... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/postypes.h
...... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar
....... /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/ctime
........ d:/cygwin/usr/include/time.h
......... d:/cygwin/usr/include/machine/time.h
......... /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
....... d:/cygwin/usr/include/wchar.h
........ /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h
In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/postypes.h:46,
                 from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iosfwd:50,
                 from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/ios:44,
                 from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/ostream:45,
                 from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iostream:45,
                 from D:\home\hello\main.cpp:1:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:146: error: `::fgetwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:147: error: `::fgetws' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:148: error: `::fputwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:149: error: `::fputws' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:150: error: `::fwide' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:151: error: `::fwprintf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:152: error: `::fwscanf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:153: error: `::getwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:154: error: `::getwchar' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:159: error: `::putwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:160: error: `::putwchar' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:161: error: `::swprintf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:162: error: `::swscanf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:163: error: `::ungetwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:164: error: `::vfwprintf' has not been declared



   

Offline aurisc4

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: help about using C:B with cygwin.
« Reply #1 on: July 21, 2008, 07:48:02 pm »
Quote
A simple "hello world" program is used to test my setup. it works (compling and building )quite fine. however, when i'm using the building option " -mno-cygwin" to the project.  it shows a lot of errors.
can any one help me about this? thx a lot~
When you use -mno-cygwin, you are using MinGW, not Cygwin.
Quote
The more, is there good way that to build a pure native win32 application ? i mean the application should not depend on "cygwin1.dll". i have to use cygwin as i'm using several 3-th party libs, such as GMP, CGAL,Boost..
If you don't want cygwin1.dll, use MinGW, not Cygwin. GMP is available, Boos I think too. Possibly you will need to compile them yourself.