Error building Extension SDK Linux code

schnepper
2024-04-01
2024-04-02
  • schnepper - 2024-04-01

    I'm installed the CODESYS Control for Linux SL package and am trying to use the Extension API to call a simple C function. When I get to the step to run "make all" on the Linux machine, I get the error:

    build interface header: out/CmpFirstTestItf.h from CmpFirstTestItf.m4
    ERROR: This functionname does not contain _cext (this is mandatory, see help for details):
    DEF_API(void',CDECL',external_struct__fb_init',(external_struct_fb_init_struct *p)',1,0x1F77E075,0x00000001)

    Why does "Generate Runtime System Files" create a function that does not have cext in the name?

    What am I missing?

     
  • nano - 2024-04-02

    Hey schnepper,
    when i look into your c-file, i would say that only the main-function is declared with cext-addendum in your codesys-library-project. all yΓΆur funtions in library has to be the cext-addendum when the external implementation is activ.

    if i remeber right, methods and other subelements dont need that, but every base-elements

     

    Last edit: nano 2024-04-02
  • schnepper - 2024-04-02

    Solved: I started from a fresh project and everything worked. I had a Function Block in the project at one point and deleted it. I think Codesys doesn't fully clean up on deletes.

     

Log in to post a comment.