Closed jillemash closed 4 years ago
Hey! The devel branch is not guaranteed to compile, and when it does, it's usually broken. Especially as of late because I've been trying (and failing) at implementing cache coherency optimizations.
I recommend you switch to master and let me know if anything is wrong there.
Hi,
thanks for your answer. The error about undeclared "ik" is gone indeed.
At first I couldn't link with clang
c++ -I ../install/include/ -L../install/lib -lik main.c
d: library not found for -lik
I've build ik as both static and shared lib.
The reason was apparently that the produced library name does not start with lib. I've renamed it as libik.dylib and it found it.
Then at runtime I had another error where it didn't find the dyn lib, an rpath issue maybe but I didn't investigate.
I've decided to link statically by just adding the abs path of the lib on the command line:
c++ -I ../install/include/ main.c /Users/jmhenaff/work/ik/install/lib/ik.a
And now it runs. Just wanted to share how I managed to make it run, I figured it could be useful to add such instructions in the documentation, to set up the code example in the README. Maybe the sample could be pushed with a CMake file in the repo, so that people can directly use it easily.
Thanks!
Yeah the reason for removing the lib prefix is so that python can find it. I should make it so it only does that if IK_PYTHON=ON
.
If you're using CMake for your project you should be able to just add_subdirectory("ik/ik")
and then target_link_libraries (myapp PRIVATE ik)
.
Or alternatively, if you install the library somewhere, it also installs cmake files with it so you should be able to call find_package (ik REQUIRED)
and then target_link_libraries (myapp PRIVATE ik)
.
Ok great thanks for your help! I won't be trying to use CMake in a near future, so I'll close the issue, I'll re-open it if I encounter an issue with that.
Thanks.
Hi,
I was trying to build devel branch and run the example on my Mac (https://github.com/TheComet/ik#example-usage). CMake works, make -j8 works and make install is error free as well. But I cut'n pasted the example code and just tried to compile it on the command line, but it does not compile. With the c++ command I get that ik is not declared:
And in C:
I didn't change the default value of IK_API_NAME, but I also explicitely set it to 'ik', nothing changed.
Here are the only changes I've made to devel:
Thanks for your help.