bcc
bcc copied to clipboard
Error with "Struct" in external function definition: Syntax error - expecting ','.
Use the following files: test.bmx:
SuperStrict
Framework brl.standardio
Import "aud.bmx"
Print "here"
aud.bmx:
SuperStrict
Framework brl.basic
Import "external.h"
Extern
Function test_struct:Int(f:Byte Ptr, chan:Int) = "int test_struct(struct mystruct*, int)"
Function test:Byte Ptr() = "char* test()"
EndExtern
external.h:
#include <stddef.h>
#include <stdint.h>
struct mystruct {
size_t something;
};
int test_struct(struct mystruct *f, int chan);
static struct mystruct myfa={0};
char* test()
{ return &myfa; }
int test_struct(struct mystruct *fa, int chan) {
return 0;
}
(readymade zip: imp_test.zip )
Output:
[ 9%] Processing:aud.bmx
[ 10%] Processing:test.bmx
Compile Error: Syntax error - expecting ','.
[/imp_test/.bmx/aud.bmx.release.linux.x64.i;4;0]
Compilation failed.