I have written a function in C++, making a DLL:
functions.h:
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
int DLLsquare(int x);
#endif /* FUNCTIONS_H */
functions.cpp:
#include "functions.h"
int DLLsquare(int x){
return x*x;
}
I compiled this to a DLL. Now I would like to import this into Pascal Script:
program TestDLL;
function Square(x: Integer): Integer;
external '[email protected]';
begin
end.
Now this doesn't compile. I get:
(7:1): Semicolon (';') expected at line 6
Compiling failed.
Several tutorials on the internet tell me that this is exactly the way to go, so what am I missing here?