0126: Can't export a foreign function definition

Compiler found a foreign function definition combined with the export keyword:

export function foo<cdecl, 0xC0DE000>() // Error: Can't export a foreign function definition foo

Possible solutions:

  • remove export keyword

function foo<cdecl, 0xC0DE000>()
  • make a local SCM function and export it instead:

function foo<cdecl, 0xC0DE000>()

export function foo_wrapper()
  foo()
end

Last updated