I compile opsrc.c file with gcc -O2 -shared -o newopc.dll opsrc.c -DUSE_DOUBLE -I"C:\Program Files\Csound6_x64\include\csound". Generated .dll file is then in the same folder as my .csd file.
When I run csound .\13A01_newop.csd command I get this error:
“error: syntax error, unexpected T_IDENT (token “newopc”) from file .\13A01_newop.csd (1) line 11: —asig newopc — Unexpected untyped word asig when expecting a variable Parsing failed due to invalid input!”
I am working on windows 10 with this Csound version:
“–Csound version 6.16 (double samples) Jul 17 2021 [commit: fb5bdb3681e15f56c216b4e4487b45848aa6b9f4] libsndfile-1.0.31”
I’ve figured it out. Problem was that I didn’t have LINKAGE at the end of the opsrc.c file.
If someone else stumbles upon same problem this is how opsrc.c should look like: