ethz-adrl/towr

libtowr.so: undefined reference to `ifopt::Component::Print() const'

Neotriple opened this issue · 1 comments

Attempting to make TOWR using the cmake functionality. The IFOPT example works (and IFOPT itself has compiled), but making TOWR fails.

If I adjust the CmakeLists.txt to comment out any of the TOWR test examples, it also compiles fine, so it seems to be an issue with one of the example files, but I can't seem to nail down the issue.

Full error:

Scanning dependencies of target towr-example
[100%] Building CXX object CMakeFiles/towr-example.dir/test/hopper_example.cc.o
Linking CXX executable towr-example
libtowr.so: undefined reference to `ifopt::Component::Print() const'
collect2: error: ld returned 1 exit status
make[2]: *** [towr-example] Error 1
make[1]: *** [CMakeFiles/towr-example.dir/all] Error 2
make: *** [all] Error 2

Interestingly enough, the software compiles fine on another, local, account I've setup on my machine with a clean install of IPOPT, IFOPT, and TOWR.

Hi! It's probably not a problem with the example, but with locating the ifopt-core library (libifopt_core.so), which holds the function Component::Print(). The linker cannot find it. Can you make sure you installed ifopt with sudo make install before building towr. This should put libifopt_core.so in /usr/local/ for towr to subsequently find it. Good luck!