MATLAB: Neural network result save and load

c librarynetwork save and laodneural network

When I use neural network, network is created. I used to save and load it using load and save function in matlab.
When I make my matlab file to standalone executable, I had no problem with these functions. But when I make my matlab file that contains the functions to c language library, and call it in a c program, I have a warning message.
"Warning: Class 'network' is an unknown object class or does not have a valid 'loadobj' method. Object 'net1' of this class has converted to a structure."
The network is changed to structure and I have a error message below, when I call the sim function in neural network toolbox.
"Undefined function or method 'sim for input argument of type 'struct'"
How I can get around this problem? I saw that basic program worked well with the "network". My standalone executable worked well, too.