Hello,
I am using SMILE in a Matlab/Simulink model, which uses a so called
S-Function. When I compile the model, the error "SMILE INITERR 00" appears
recursively on the console, the program never finishes compiling and Matlab
crashes. I am using Matlab 2016a under Ubuntu 16.04.
Thanks.
Compiling SMILE in Matlab
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: Compiling SMILE in Matlab
SMILE relies on its private global C++ object to perform license initialization. The error you're getting (SMILE INITERR 00) indicates that the constructors of global objects in SMILE were not invoked on startup. It's probably caused by the compiler settings used to build the executable with your S-function.
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: Compiling SMILE in Matlab
We have just received another report about SMILE INITERR 00. The problem was caused by a global DSL_network object, the constructor of which ran before licensing key was initialized. If you have global DSL_network in your program and want to keep it, please replace this:
with this
This ensures that DSL_network's constructor runs after the initialization of your SMILE licensing key.
Code: Select all
DSL_network n;
void someFunc1() {
// use n here
}
void someFunc2() {
// use n here
}
Code: Select all
DSL_network& GeNetwork() {
static DSL_network n;
return n;
}
void someFunc1() {
// use GetNetwork here
}
void someFunc2() {
// use GetNetwork here
}