Closed gabepierng closed 5 years ago
Hi @gabepierng , thanks for your report!
chai3d
and haply-api-cpp
are meant to be compiled as static libraries. Here in your case, the compiler is looking for exported symbols in a .lib
file that to compile against a .dll
dynamic library. See a similar issue here.
Could you clear the cmake cache and set cmake flag BUILD_SHARED_LIBS to off, and try to rebuild?
I added a line to explicitly set BUILD_SHARED_LIBS off. I was actually able to fix the issue a little earlier. When I was building it in VS, there was also an error ambiguous symbol <byte>
. This was discussed here. Though VS recognized it as Haply::byte
if I hovered the cursor over it, they recommended explicitly qualifying it as Haply::byte
instead of just byte
in the function call where it was located.
Before
void WjwwoodSerial::readBytes(std::vector<byte>& in_data)
After
void WjwwoodSerial::readBytes(std::vector<Haply::byte>& in_data)
After this, VS built the static library just fine and it all built successfully For reference, running Visual Studio 2013
Well spotted for both fixes!
I have updated https://github.com/HaplyHaptics/Haply-API-cpp/commit/8d1b3543ccc3482338de126ee8e93bffd347bc21 and HaplyHaptics chai3d https://github.com/HaplyHaptics/chai3d/commit/f9965800cb13d115cb55d6346bcde9226a43a33f with your fixes. Compiles and runs on Linux.
Is building on Windows now successful your side? If so, we can close this issue.
Yup, it is building successfully in Windows on my side now. I can go ahead and close the issue. Thanks!
I'm currently working on building and compiling on a windows machine. However, I am getting caught up after cmake. Running cmake is successful (output logs attached), and it generates the VC++ project files needed for Visual Studio.
However, when I open those in VS and attempt to build them, the build fails as the linker cannot locate one of the libraries.
The VS build did generate a chai3d.lib file in ....\Debug, so that part is at least working correctly.
Also not sure if this is out of scope and/or better suited for chai3d github, but it seems to be an issue with the VS build instructions the CMake process is outputting
CMakeOutput.log