This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

malloc undefined cross compiling with gcc 3.4.3 for mingw32


I have installed the cross toolchain with -
 
 binutils 2.15.94.0.2
 configure --prefix=/opt/compilers --host=i486-pc-linux-gnu \
 --build=i486-pc-linux-gnu --target=i486-mingw32 --infodir=/tmp \
 --mandir=/tmp --datadir=$PREFIX/i486-mingw32/share
 make
 make gnulocaledir=/tmp localedir=/tmp install
 
 gcc 3.4.3
 configure --prefix=/opt/compilers -host=i486-pc-linux-gnu \
 --build=i486-pc-linux-gnu --target=i486-mingw32 --infodir=/tmp \
 --enable-threads=win32 \
 --mandir=/tmp --datadir=$PREFIX/i486-mingw32/share
 make
 make -C gnatlib
 make gnulocaledir=/tmp localedir=/tmp install
 
 w32api 3.2
 configure --prefix=/opt/compilers/i486-mingw32 --build=i486-pc-linux-gnu \
 --host=i486-mingw32 --target=i486-mingw32
 make
 make install
 
 mingw-runtime 3.7
 configure --prefix=/opt/compilers/i486-mingw32 \
 --build=i486-pc-linux-gnu --host=i486-mingw32 --target=i486-mingw32
 make
 make install
 
 wxWidgets 2.6.0
 configure --prefix=/opt/compilers/i486-mingw32 --mandir=/tmp --infodir=/tmp \
 --build=i486-pc-linux-gnu --host=i486-mingw32--enable-optimise \
 --with-libpng --with-libjpeg --with-libtiff \
 --with-zlib --without-sdl --enable-odbc --disable-monolithic --enable-threads
 make
 make install
 mv /opt/compilers/i486-mingw32/lib/wx*.dll /opt/compilers/i486-mingw32/bin
 
 Everything worked well including the other libraries - zlib, jpeg etc.
 
 I then tried aMule 2.0.1 -
( Compiles perfectly with wxgtk under linux with same toolchain version )
No matter what I do what options I use to compile the cross compiler or wxwidgets 
I get the same problem.

 configure --host=i486-mingw32 --enable-amule-gui --enable-amulecmd \
 --enable-amulecmdgui --enable-amule-daemon --enable-webserver \
 --enable-webservergui --enable-alc --enable-alcc --enable-cas --enable-wxcas \
 --with-wx-prefix=/opt/compilers/i486-mingw32
 make
 and got the following fatal errors ( in a number of files ) -
 if i486-mingw32-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/comilers/i486-mingw32/include \
 -I/opt/compilers/i486-mingw32/lib/wx/include/i486-mingw32-msw-ansi-release-2.6 \
 -I/opt/compilers/i486-mingw32/include/wx-2.6 -D__WXMSW__ -mthreads \
 -DWXUSINGDLL=1 -DNO_GCC_PRAGMA -DwxUSE_GUI=0 \
 -I/usr/include/libpng12 -DEC_REMOTE \
 -DWEBSERVERDIR="\"/usr/share/amule/webserver\"" \
 -I/opt/comilers/i486-mingw32/include -DUSE_EMBEDDED_CRYPTO -W -Wall -g \
 -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0 -MT amuleweb-WebServer.o \
 -MD -MP -MF ".deps/amuleweb-WebServer.Tpo" -c-o amuleweb-WebServer.o \
 `test -f 'WebServer.cpp' || echo './'`WebServer.cpp; \
 .
 .
 .
 /opt/compilers/lib/gcc/i486-mingw32/3.4.3/../../../../include/c++/3.4.3/cstdlib:103: error: `::malloc' has not been declared
 /opt/compilers/lib/gcc/i486-mingw32/3.4.3/../../../../include/c++/3.4.3/cstdlib:111: error: `::realloc' has not been declared
 /opt/compilers/i486-mingw32/include/wx-2.6/wx/buffer.h:96: error: `malloc' undeclared (first use this function)
 /opt/compilers/i486-mingw32/include/wx-2.6/wx/buffer.h:96: error: (Each undeclared identifier is reported only once for each function it appears in.)
 /opt/compilers/i486-mingw32/include/wx-2.6/wx/buffer.h:100: error: `malloc' undeclared (first use this function)
 /opt/compilers/i486-mingw32/include/wx-2.6/wx/buffer.h:134: error: `malloc' undeclared (first use this function)
 /opt/compilers/i486-mingw32/include/wx-2.6/wx/buffer.h:145: error: `realloc' undeclared (first use this function)
  
 (Extraneous warning filtered)
 
 My problem is the malloc thing.
 
 Any help would be appreciated.
 
 Thanx
-- 
regs MR E_T
_______________________
\                      \
  \   OOHH I hate TYPOS  \
    \                      \
      ~~~~~~~~~~~~~~~~~~~~~~~


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