Using halcompile

More
09 Oct 2015 20:38 #63623 by Niko
Using halcompile was created by Niko
Hello,
I'm trying to write my first hal component and naturally I started with an example .
component mysincos;
pin out float sin_;
pin out float cos_;
pin in float theta;
function _;
license "GPL"; // indicates GPL v2 or later
;;
#include <rtapi_math.h>
FUNCTION(_) { sin_ = sin(theta); cos_ = cos(theta); }

sudo halcompile --install mysincos.comp gave this error

make KBUILD_EXTRA_SYMBOLS=/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/Module.symvers -C /usr/src/linux-headers-3.4-9-rtai-686-pae SUBDIRS=`pwd` CC=gcc V=0 modules
make[1]: Entering directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
CC [M] /tmp/tmpa7X3ga/mysincos.o
gcc: error: components: No such file or directory
gcc: error: components: No such file or directory
make[4]: *** [/tmp/tmpa7X3ga/mysincos.o] Error 1
make[3]: *** [_module_/tmp/tmpa7X3ga] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
make: *** [modules] Error 2

The .comp file is in a directory that I had previously made . To be honest I'm not sure where it should be .

Please Log in or Create an account to join the conversation.

More
09 Oct 2015 20:45 #63624 by Niko
Replied by Niko on topic Using halcompile
Figured it out . chmod +x the file and in the home directory .

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum