I am trying to load a urdf file using OGRE but I am having some issue while compiling. Below is my make file
CC = g++
CC_FLAGS = -w -std=c++0x -I/usr/include/OGRE
LIBS = -ltbb -lrt -lpthread -lm -ldl -lOgreMain -lboost_system
EXEC = run
SOURCES = $(wildcard *.cc)
OBJECTS = $(SOURCES:.cc=.o)
#Main target
all: $(OBJECTS)
$(CC) $(OBJECTS) -o $(EXEC) $(LIBS)
#To obtain object files
%.o: %.cc
$(CC) -c $(CC_FLAGS) $< -o $@ $(LIBS)
.PHONY: clean
clean:
rm -f $(EXEC) $(OBJECTS)
I get the following error:
main.o: In function `addLink(boost::shared_ptr<urdf::Link const>)':
main.cc:(.text+0x535): undefined reference to `rviz::loadMeshFromResource(std::string const&)'
main.o: In function `initModel(char const*)':
main.cc:(.text+0x134e): undefined reference to `urdf::Model::initFile(std::string const&)'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
Any idea on how to fix it.
Aucun commentaire:
Enregistrer un commentaire