smealum / SPACECRAFT

SPACECRAFT
52 stars 2 forks source link

Compilation Error #7

Closed ghost closed 8 years ago

ghost commented 8 years ago
(...)
[ 94%] Building CXX object CMakeFiles/trees.dir/tests/trees.cpp.o
[ 96%] Linking CXX executable ../bin/trees
CMakeFiles/trees.dir/tests/trees.cpp.o: In function `main':
/home/pbb/proj/SPACECRAFT/tests/trees.cpp:6: undefined reference to `Tree::Tree()'
/home/pbb/proj/SPACECRAFT/tests/trees.cpp:8: undefined reference to `Tree::generate(int)'
/home/pbb/proj/SPACECRAFT/tests/trees.cpp:6: undefined reference to `Tree::~Tree()'
/home/pbb/proj/SPACECRAFT/tests/trees.cpp:6: undefined reference to `Tree::~Tree()'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/trees.dir/build.make:107: ../bin/trees] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/trees.dir/all] Error 2
make: *** [Makefile:95: all] Error 2
ghost commented 8 years ago

Fixed by uncommenting this:

# XXX this line makes the difference between being able to compile tests ot not on OSX. I just cannot understand why
message("obj: ${all_obj}")