ami-iit / meshcat-cpp

Self-contained C++ interface for the MeshCat visualizer
BSD 3-Clause "New" or "Revised" License
25 stars 4 forks source link

Fix two bugs #1

Closed matheecs closed 1 year ago

matheecs commented 1 year ago

Fix to find correct misc directory and meshcat_example. Now, run the example by

git clone --recurse-submodules https://github.com/GiulioRomualdi/meshcat-cpp.git
cd meshcat-cpp
mkdir build && cd build
cmake ..
make -j
./example
traversaro commented 1 year ago

Hello @matheecs ! I think it is useful to separate the two fixes: the second one (add array include) is indeed a fix.

The first one is a bit tricky. Basically, at the moment meshcat-cpp is meant to be used when installed, and only linking the installed library. It is not meant to work by linking the library in the build directory. This is because some resources are found by looking at the appropriate relative location w.r.t. the location of the library, via reloc-cpp. Your change make the library work when it is used from the build directory, but it breaks the use of the library when installed, so it is not desirable. Two possible fixes are either:

fyi @GiulioRomualdi