Note that there are some explanatory texts on larger screens.

plurals
  1. POErrors Linking ColladaDom
    text
    copied!<p>I'm trying to build a tool that uses <code>colladadom</code>, but I'm getting linker errors. This is my makefile</p> <pre><code>CXXFLAGS = -Wall -fPIC -g -t OBJECTS = mesher.o oar.o primitive.o assigner.o meshmerizer.o primmesher.o colladifier.o main.o LIBS = -I/opt/local/include -L/opt/local/lib -lboost_system -lboost_filesystem - lcollada14dom default: all all: $(OBJECTS) $(CXX) $(CXXFLAGS) -o oarcoll $^ $(LIBS) main.o : src/meshmerizer.h src/primmesher.h src/main.cpp $(CXX) $(CXXFLAGS) -c $^ colladifier.o : src/colladifier.cpp $(CXX) $(CXXFLAGS) -c $^ assigner.o : lib/assigner.cpp $(CXX) $(CXXFLAGS) -c $^ primitive.o : lib/assigner.h src/utils.h src/prim_enum.h src/primitive.cpp $(CXX) $(CXXFLAGS) -c $^ mesher.o : src/mesher.cpp $(CXX) $(CXXFLAGS) -c $^ oar.o : src/oar.cpp $(CXX) $(CXXFLAGS) -c $^ primmesher.o : src/primmesher.cpp $(CXX) $(CXXFLAGS) -c $^ meshmerizer.o : src/meshmerizer.cpp src/primmesher.h $(CXX) $(CXXFLAGS) -c $^ clean: rm -f oarcoll main.o $(OBJECTS) *~ </code></pre> <p>When I compile, I get this result:</p> <pre><code>Undefined symbols for architecture x86_64: "boost::system::generic_category()", referenced from: __static_initialization_and_destruction_0(int, int)in colladifier.o __static_initialization_and_destruction_0(int, int)in main.o "boost::system::system_category()", referenced from: __static_initialization_and_destruction_0(int, int)in colladifier.o __static_initialization_and_destruction_0(int, int)in main.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [all] Error 1 </code></pre> <p>I can compile with no problem if I do it all in one line and do not make .o files and link them later. I.e. this: </p> <pre><code>g++ domTest.cc -I/opt/local/include -L/opt/local/lib -lboost_system -lcollada15dom -o domTest </code></pre> <p>works fine on the same machine.</p> <p>I've run nm on libboost_system.dylib and the symbols that are undefined appear in the dump.</p> <p>There are multiple other threads similar to this, I've seen them and tried the solutions, but it still does not work for me.</p> <p>Any ideas?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload