Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cpsmusic

macrumors newbie
Original poster
Feb 24, 2008
23
0
Hi,

I'm trying to build a library (libtao - see http://taopm.sourceforge.net/ for more info). The library is part of a larger project that includes some shell scripts and helper applications. Basically it works as follows - a Tao script file is parsed to a C++ file that is then linked with libtao and run.

I'm currently trying to build just the library part of the project (libtao). The library is fairly straightforward and the only external libs it uses are OpenGL/GLUT.

I've put together a simple makefile as follows:

Code:
libtao: Tao.o TaoAccessPoint.o TaoBow.o TaoCell.o TaoCircle.o TaoConnector.o \
		TaoDevice.o TaoEllipse.o TaoGraphicsEngine.o TaoHammer.o TaoInstrument.o \
		TaoOutput.o TaoPitch.o TaoRectangle.o TaoStop.o TaoString.o \
		TaoSynthEngine.o TaoTriangle.o
	g++ -dynamiclib -o ./lib/libtao.dylib ./build/Tao.o ./build/TaoAccessPoint.o \
	./build/TaoBow.o ./build/TaoCell.o ./build/TaoCircle.o ./build/TaoConnector.o \
	./build/TaoDevice.o ./build/TaoEllipse.o ./build/TaoGraphicsEngine.o \
	./build/TaoHammer.o ./build/TaoInstrument.o ./build/TaoOutput.o \
	./build/TaoPitch.o ./build/TaoRectangle.o ./build/TaoStop.o \
	./build/TaoString.o ./build/TaoSynthEngine.o ./build/TaoTriangle.o \
	-framework GLUT -framework OpenGL 

Tao.o: ./src/Tao.cc
	g++ -c -g -pg ./src/Tao.cc -o ./build/Tao.o -DHAVE_OSX -I./include 

TaoAccessPoint.o: ./src/TaoAccessPoint.cc
	g++ -c -g -pg ./src/TaoAccessPoint.cc -o ./build/TaoAccessPoint.o -DHAVE_OSX -I./include

TaoBow.o: ./src/TaoBow.cc
	g++ -c -g -pg ./src/TaoBow.cc -o ./build/TaoBow.o -DHAVE_OSX -I./include

TaoCell.o: ./src/TaoCell.cc
	g++ -c -g -pg ./src/TaoCell.cc -o ./build/TaoCell.o -DHAVE_OSX -I./include

TaoCircle.o: ./src/TaoCircle.cc
	g++ -c -g -pg ./src/TaoCircle.cc -o ./build/TaoCircle.o -DHAVE_OSX -I./include

TaoConnector.o: ./src/TaoConnector.cc
	g++ -c -g -pg ./src/TaoConnector.cc -o ./build/TaoConnector.o -DHAVE_OSX -I./include

TaoDevice.o: ./src/TaoDevice.cc
	g++ -c -g -pg ./src/TaoDevice.cc -o ./build/TaoDevice.o -DHAVE_OSX -I./include

TaoEllipse.o: ./src/TaoEllipse.cc
	g++ -c -g -pg ./src/TaoEllipse.cc -o ./build/TaoEllipse.o -DHAVE_OSX -I./include

TaoGraphicsEngine.o: ./src/TaoGraphicsEngine.cc
	g++ -c -g -pg ./src/TaoGraphicsEngine.cc -o ./build/TaoGraphicsEngine.o -DHAVE_OSX -I./include

TaoHammer.o: ./src/TaoHammer.cc
	g++ -c -g -pg ./src/TaoHammer.cc -o ./build/TaoHammer.o -DHAVE_OSX -I./include

TaoInstrument.o: ./src/TaoInstrument.cc
	g++ -c -g -pg ./src/TaoInstrument.cc -o ./build/TaoInstrument.o -DHAVE_OSX -I./include

TaoOutput.o: ./src/TaoOutput.cc
	g++ -c -g -pg ./src/TaoOutput.cc -o ./build/TaoOutput.o -DHAVE_OSX -I./include

TaoPitch.o: ./src/TaoPitch.cc
	g++ -c -g -pg ./src/TaoPitch.cc -o ./build/TaoPitch.o -DHAVE_OSX -I./include

TaoRectangle.o: ./src/TaoRectangle.cc
	g++ -c -g -pg ./src/TaoRectangle.cc -o ./build/TaoRectangle.o -DHAVE_OSX -I./include

TaoStop.o: ./src/TaoStop.cc
	g++ -c -g -pg ./src/TaoStop.cc -o ./build/TaoStop.o -DHAVE_OSX -I./include

TaoString.o: ./src/TaoString.cc
	g++ -c -g -pg ./src/TaoString.cc -o ./build/TaoString.o -DHAVE_OSX -I./include

TaoSynthEngine.o: ./src/TaoSynthEngine.cc
	g++ -c -g -pg ./src/TaoSynthEngine.cc -o ./build/TaoSynthEngine.o -DHAVE_OSX -I./include

TaoTriangle.o: ./src/TaoTriangle.cc
	g++ -c -g -pg ./src/TaoTriangle.cc -o ./build/TaoTriangle.o -DHAVE_OSX -I./include


clean:
	\rm ./build/*.o ./lib/*.a


Here are the errors I'm getting:


Undefined symbols:
"_tao", referenced from:
_Tick in Tao.o
_Time in Tao.o
_tao$non_lazy_ptr in Tao.o
_tao$non_lazy_ptr in TaoAccessPoint.o
_tao$non_lazy_ptr in TaoBow.o
_tao$non_lazy_ptr in TaoConnector.o
_tao$non_lazy_ptr in TaoDevice.o
_tao$non_lazy_ptr in TaoGraphicsEngine.o
_tao$non_lazy_ptr in TaoHammer.o
_tao$non_lazy_ptr in TaoInstrument.o
_tao$non_lazy_ptr in TaoOutput.o
_tao$non_lazy_ptr in TaoStop.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libtao] Error 1


What do these errors mean and how do I fix them?

Cheers,

Chris
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.