I am trying to develop the kinematics of an hexapod in the CfromScript (usrcode.c).
When I try to compile the project, I am getting various errors of "multiple definitions" regarding native functions of PowerPMAC IDE (e.g: GetEnumPtrVar / GetEnumPtrArrayVar), pointing to lines in "pp_proj.h" file, but called from different output files: usrcode.o file and one I created called "kin_hexbestec.o" file. The multiple declarations points to the same line, as if the files (and definitions) are considered twice, although the "pp_proj.h" has the "#ifndef _PP_PROJ_H_" macro at the beggining.
After some debug, I realize that the problem is that the functions are implemented in the header file "pp_proj.h", which is automatically created during compilation. Which means that I can't include this file in separate "compilation units" (.o files). The problem is that this is the same header file (pp_proj.h) in which the "global definitions" variables are available for use in C code. How can I use these global variables in different C files without these errors?
When I try to compile the project, I am getting various errors of "multiple definitions" regarding native functions of PowerPMAC IDE (e.g: GetEnumPtrVar / GetEnumPtrArrayVar), pointing to lines in "pp_proj.h" file, but called from different output files: usrcode.o file and one I created called "kin_hexbestec.o" file. The multiple declarations points to the same line, as if the files (and definitions) are considered twice, although the "pp_proj.h" has the "#ifndef _PP_PROJ_H_" macro at the beggining.
After some debug, I realize that the problem is that the functions are implemented in the header file "pp_proj.h", which is automatically created during compilation. Which means that I can't include this file in separate "compilation units" (.o files). The problem is that this is the same header file (pp_proj.h) in which the "global definitions" variables are available for use in C code. How can I use these global variables in different C files without these errors?