i'm trying to create a local module in robot NAO in linux with the c++ sdk, as in this tutorial http://doc.aldebaran.com/2-1/dev/cpp/tutos/create_module.html#cpp-create-module. I have compile and sent the library libmymodule.so to the robot, also i have add the path to the module in the autoload.ini file. But when i run the naoqi the module does not work.
Reading this http://agravier.com/2013/NAO-C++-tutorial-part-3-The-Apprentice-NAOmancer, and applying this command: less /var/log/naoqi/head-naoqi.log i get the following error: Could not load library: /home/nao/naoqi/libmymodule.so, Error was: /home/nao/naoqi/libmymodule.so: wrong ELF class: ELFCLASS64. The file libmymodule.so is of 64 bits, but also other librarys that are on the nao-sdk folder are of 64 bits, so i dont know what is the problem.
Does anyone know what is the problem?
The robot has a 32-bit i686 processor. It looks like you have compiled the binary for your PC, not for the robot.
To compile for the robot, you will have to use the cross-toolchain. Since I could not find it on the official website, here is a copy from a third-party.
You could also contact the support to request it. But you will need Linux to make it work.
Otherwise you might be able to do it with a third-party cross-toolchain like musl
.