- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » External function unexpected syntax...
External function unexpected syntax error
External function unexpected syntax error
Hi,
I have an example of an external function from a previous version of openmodelica (it worked on 1.6.0). Now when I want to modify this example in 1.8.0 OMEdit I get an error that the sintax isn't correct, and after that if I want to save once more the file the OMEdit throws an error and exits:
Below is the file:
Code:
function ExampleFunc1
annotation(LibraryDirectory = "//Resources/Library");
annotation(IncludeDirectory = "//Resources/Include");
input Real x;
output Real y;
external "C" y = ExternalFunc2(x) annotation(Library = "ExternalLibrary", Include = "#include \"ExternalFunc2.h\"");
end ExampleFunc1;
when I want to save it gives me the following error:
Error occurred building AST
[<interactive>7:122-7:122:writable] Error: Lexer failed to recognize '\\"\"');
end'
[< interactive >7:123-7:123:writable] Error: Lexer failed to recognize '\"\"');
end'
After this if I want to save once more the file, or to save an other file I get:
The instruction at "0x6a214c43" referenced memory at "0x7d892880". The memory could not be "read".
and the OMEdit exits
I run OpenModelica 1.8.0 latest released version on an Windows XP system
What do I do wrong?
Can you please help me
Re: External function unexpected syntax error
Hi,
Yes, this seems to be a bug with escaping strings send to OMC.
You could try to use < instead of " for includes for now.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » External function unexpected syntax...