Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Running the example code #11

@LordGlamdring

Description

@LordGlamdring

Hi!

I would like to try to use your software in my school project. For this project in need to make a robot arm move to a specific coordinate. After ready the wiki i wanted to try out the example code form the README file. I ran into some issue's

  1. So i started my virtual machine with an ubuntu 18.04 image.
  2. I ran the required commands
mkdir build && cd build
cmake ../
make -j8
sudo make install
  1. Then i made a new file in another directory and executed the example code from the README with the following command
    sudo g++ -o mytest test.cpp

It did not comple an gave the following errors:

test.cpp: In function ‘int main()’:
test.cpp:10:66: error: invalid conversion from ‘int’ to ‘ik_node_t*’ [-fpermissive]
     struct ik_node_t* child1 = solver->node->create_child(1, root);
                                                                  ^
test.cpp:10:66: error: invalid conversion from ‘ik_node_t*’ to ‘uint32_t {aka unsigned int}’ [-fpermissive]
test.cpp:11:68: error: invalid conversion from ‘int’ to ‘ik_node_t*’ [-fpermissive]
     struct ik_node_t* child2 = solver->node->create_child(2, child1);
                                                                    ^
test.cpp:11:68: error: invalid conversion from ‘ik_node_t*’ to ‘uint32_t {aka unsigned int}’ [-fpermissive]
test.cpp:12:68: error: invalid conversion from ‘int’ to ‘ik_node_t*’ [-fpermissive]
     struct ik_node_t* child3 = solver->node->create_child(3, child2);
                                                                    ^
test.cpp:12:68: error: invalid conversion from ‘ik_node_t*’ to ‘uint32_t {aka unsigned int}’ [-fpermissive]
test.cpp:31:15: error: ‘const struct ik_solver_interface_t’ has no member named ‘rebuild_data’; did you mean ‘rebuild’?
     ik.solver.rebuild_data(solver);
               ^~~~~~~~~~~~
               rebuild

I tried fixing it, but no succes.

  1. Then i tried the example code form Tutorial 2.0
    This gave these errors:
test.cpp: In function ‘int main()’:
test.cpp:4:5: error: ‘ik_init’ was not declared in this scope
     ik_init();
     ^~~~~~~
test.cpp:5:5: error: ‘ik_log_init’ was not declared in this scope
     ik_log_init();
     ^~~~~~~~~~~
test.cpp:8:43: error: ‘ik_uid’ was not declared in this scope
     struct ik_node* base = ik_node_create(ik_uid(0));
                                           ^~~~~~
test.cpp:8:43: note: suggested alternative: ‘ik_node’
     struct ik_node* base = ik_node_create(ik_uid(0));
                                           ^~~~~~
                                           ik_node
test.cpp:8:28: error: ‘ik_node_create’ was not declared in this scope
     struct ik_node* base = ik_node_create(ik_uid(0));
                            ^~~~~~~~~~~~~~
test.cpp:8:28: note: suggested alternative: ‘ik_node_t’
     struct ik_node* base = ik_node_create(ik_uid(0));
                            ^~~~~~~~~~~~~~
                            ik_node_t
test.cpp:9:5: error: ‘IK_INCREF’ was not declared in this scope
     IK_INCREF(base); /* Always have to take ownership of root node */
     ^~~~~~~~~

the list goes on.

I probably made a mistake while setting everything up. mabey i have to put the file i want to compile somewhere specific?
Could you tell me how i can compile one of the examples?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions