Re: how to make msys+mingw support math and stdlib libraries of c++?



On Sun, 24 May 2009 15:22:08 +0800
明覺 <shi minjue gmail com> wrote:

> I have successfully built the environment for gtkglextmm, using
> mingw+msys, and now I'm ready to build my own application by it, but
> it seems that there is no math and stdlib library support yet, here is
> the error of my compile:
> -----------------------------
> $ g++  -mwindows -mms-bitfields -mno-cygwin -g `pkg-config --cflags gtkmm-2.4
> gtkglextmm-1.2` main.cc Surface.cc  `pkg-config --libs gtkmm-2.4 gtkglextmm-1.
> 2` -lGL -lGLU -lm
> Surface.cc: In member function `double Surface::Ypo(double, double, double)':
> Surface.cc:47: error: `cos' was not declared in this scope
> Surface.cc:47: error: `sin' was not declared in this scope
> Surface.cc: In member function `void Surface::SetPoints()':
> Surface.cc:63: error: `free' was not declared in this scope
> Surface.cc:63: error: `malloc' was not declared in this scope
> ------------------------------
> any advice to solve it? thanks

Most likely Surface.cc fails to #include the relevant headers (math.h
and stdlib.h). This may work in some environments if one of the headers
it does include uses them indirectly, but different versions of GTKmm or
other may expose your bug.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]