[ODE] operator new undefined link cygwin gcc

Martin Magnusson mama7121 at student.uu.se
Tue Nov 26 16:28:02 2002


I'm having trouble compiling under Cygwin as well. Then again, it could 
be a Cygwin problem too, since I'm new to Cygwin as well. Anyway, as far 
as I can understand I've set the user-settings file correctly, and after 
that a simple 'make' should be enough, right? Using g++ didn't seem to 
help. My results are posted below. The problem seems to be with 
lib/libode.a. I don't have a directory called 'lib', and there's no 
'libode.a' anywhere on my HDD. Help, comments or flames are appreciated :)

/ Martin Magnusson


======================================================================
== Contents of ./config/user-settings: ===============================

# ODE user settings: the following variables must be set by the user

# (1) the platform to use. this name should have a corresponding
#     makefile.PLATFORM file. currently supported platforms are:
#       msvc        microsoft visual C/C++
#       mingw        minimalist GNU for windows
#       cygwin        cygnus GNU for windows
#       unix-gcc    GNU gcc on windows
#       unix-generic    generic unix compiler. you may need to edit the CC
#            variable in makefile.unix-generic
#    osx        Mac OS-X, with the gnu compiler.

PLATFORM=cygwin

# (2) the floating point precision to use (either "SINGLE" or "DOUBLE")

#PRECISION=SINGLE
PRECISION=DOUBLE

# (3) the library type to build (either "debug" if you are doing 
development,
#     or "release" for the optimized library)

#BUILD=debug
BUILD=release

=====================================================================
== Result of make with gcc: =========================================

/home/martin!/ode-0.03> make
gcc -DdDOUBLE  -DdNODEBUG -o configurator.exe configurator.c
./configurator.exe include/ode/config.h "gcc  -DdNODEBUG -o " "rm -f" ./
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.c
rm -f ctest.exe
is this a pentium on a gcc-based platform? ...
rm -f ctest.exe
gcc  -DdNODEBUG -o ctest.exe ctest.c
rm -f ctest.c
rm -f ctest.exe
integer types (we assume int >= 32 bits) ...
select the base floating point type ...
the floating point infinity ...
rm -f data
gcc  -DdNODEBUG -o ctest.exe ctest.c
ctest.c:5: initializer element is not constant
./ctest.exe
./ctest.exe: not found
rm -f data
gcc  -DdNODEBUG -o ctest.exe ctest.c
./ctest.exe
rm -f data
gcc  -DdNODEBUG -o ctest.exe ctest.c
./ctest.exe
rm -f ctest.c
rm -f ctest.exe
rm -f data

*** configurator succeeded ***

gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/array.o ode/src/array.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/error.o ode/src/error.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/memory.o ode/src/memory.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/obstack.o ode/src/obstack.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/odemath.o ode/src/odemath.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/matrix.o ode/src/matrix.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/misc.o ode/src/misc.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/rotation.o 
ode/src/rotation.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/mass.o ode/src/mass.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/ode.o ode/src/ode.cpp
ode/src/ode.cpp: In function `void dJointAttach(dxJoint*, dxBody*, 
dxBody*)':
ode/src/ode.cpp:922: warning: unused variable `dxWorld*world'
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/step.o ode/src/step.cpp
ode/src/step.cpp:701:5: warning: multi-line comment
ode/src/step.cpp:704:5: warning: multi-line comment
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/lcp.o ode/src/lcp.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/joint.o ode/src/joint.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/space.o ode/src/space.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/geom.o ode/src/geom.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/timer.o ode/src/timer.cpp
ode/src/timer.cpp:109:17: warning: multi-line string literals are deprecated
ode/src/timer.cpp:119:17: warning: multi-line string literals are deprecated
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/mat.o ode/src/mat.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O2 -o ode/src/testing.o ode/src/testing.cpp
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O1 -o ode/src/fastldlt.o ode/src/fastldlt.c
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O1 -o ode/src/fastlsolve.o 
ode/src/fastlsolve.c
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O1 -o ode/src/fastltsolve.o 
ode/src/fastltsolve.
c
gcc -c -Wall -fno-exceptions -fno-rtti -DWIN32 -DCYGWIN 
-fomit-frame-pointer -ff
ast-math -Iinclude  -DdNODEBUG -O1 -o ode/src/fastdot.o ode/src/fastdot.c
ar rc lib/libode.a ode/src/array.o ode/src/error.o ode/src/memory.o 
ode/src/obst
ack.o ode/src/odemath.o ode/src/matrix.o ode/src/misc.o 
ode/src/rotation.o ode/s
rc/mass.o ode/src/ode.o ode/src/step.o ode/src/lcp.o ode/src/joint.o 
ode/src/spa
ce.o ode/src/geom.o ode/src/timer.o ode/src/mat.o ode/src/testing.o 
ode/src/fast
ldlt.o ode/src/fastlsolve.o ode/src/fastltsolve.o ode/src/fastdot.o
ar: lib/libode.a: No such file or directory
make: *** [lib/libode.a] Error 1


=====================================================================
== Result of make with g++: =========================================

/home/martin!/ode-0.03> make
g++ -DdDOUBLE  -DdNODEBUG -o configurator.exe configurator.c
configurator.c: In function `void fatal_error(char*)':
configurator.c:112: `exit' undeclared (first use this function)
configurator.c:112: (Each undeclared identifier is reported only once 
for each
    function it appears in.)
configurator.c: In function `void delete_file(char*)':
configurator.c:167: `system' undeclared (first use this function)
make: *** [configurator.exe] Error 1