R
RK
I renamed a function in one of my files, and got this error (gcc
4.0.1, Apple build 5367)--
c++ -O2 -o cantilever Force.cpp Beam.cpp CantileverNl.cpp main.cpp
/usr/bin/ld: multiple definitions of symbol CantileverNl::G(double)
/var/tmp//ccOkSPin.o definition of CantileverNl::G(double)in section
(__TEXT,__text)
/var/tmp//ccEdCBIJ.o definition of CantileverNl::G(double)in section
(__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol __ZN12CantileverNl1GEd.eh
/var/tmp//ccOkSPin.o definition of absolute __ZN12CantileverNl1GEd.eh
(value 0x0)
/var/tmp//ccEdCBIJ.o definition of absolute __ZN12CantileverNl1GEd.eh
(value 0x0)
I couldn't find any multiple definitions. I tried changing my function
name, changing my directory, clearing /var/tmp, and rewriting my
Makefile; none of these approaches worked. However, a compilation
with Xcode returned no errors and actually went on to execute the
program successfully. Do any of you know what's happening?
4.0.1, Apple build 5367)--
c++ -O2 -o cantilever Force.cpp Beam.cpp CantileverNl.cpp main.cpp
/usr/bin/ld: multiple definitions of symbol CantileverNl::G(double)
/var/tmp//ccOkSPin.o definition of CantileverNl::G(double)in section
(__TEXT,__text)
/var/tmp//ccEdCBIJ.o definition of CantileverNl::G(double)in section
(__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol __ZN12CantileverNl1GEd.eh
/var/tmp//ccOkSPin.o definition of absolute __ZN12CantileverNl1GEd.eh
(value 0x0)
/var/tmp//ccEdCBIJ.o definition of absolute __ZN12CantileverNl1GEd.eh
(value 0x0)
I couldn't find any multiple definitions. I tried changing my function
name, changing my directory, clearing /var/tmp, and rewriting my
Makefile; none of these approaches worked. However, a compilation
with Xcode returned no errors and actually went on to execute the
program successfully. Do any of you know what's happening?