Closed 76328 closed 5 years ago
Can you show the code you're trying to compile that causes this error?
Please also say which OS you're on and which branch you checked out.
#include <ik/ik.h> int main() { struct ik_solver_t* solver = ik.solver.create(IK_FABRIK); return 0; }
VSCode on ubuntu16.04
and i use terminal to build g++ ik-master-test.c -L /usr/local/lib -I /usr/local/include/ik /tmp/ccf6dLel.o:在函数‘main’中: ik-master-test.c:(.text+0xb):对‘ik’未定义的引用 (Undefined reference) collect2: error: ld returned 1 exit status
OK I have solved this problem
when I run the example code in Readme A new problem has occured :Exception has occurred. Segmentation fault
You need to call ik.init();
first before using any other functions:
#include <ik/ik.h>
int main() {
if (ik.init() != IK_OK)
perror("ik.init failed");
struct ik_solver_t* solver = ik.solver.create(IK_FABRIK);
/* main loop here */
ik.deinit();
return 0;
}
I'm going to assume it worked for you, so I'll close this issue now :)
and when i use "ik" it showed undefined