Why do I get a runtime error when I try to link against multiple Compiler generated libraries that link against the Graphics library?
Show older comments
I get a runtime error when I try to link against multiple Compiler generated libraries that links against the Graphics library. I am using MATLAB 6.1 and the MATLAB C/C++ Graphics Library 2.3 (R12.1+).
I produced the libraries using the following command in MATLAB:
mcc -t -L C -W libhg:mylib -T link:lib -h test.m libmmfile.mlib
In my main file, I initialze and terminate my libraries like this:
void main(int argc, char **argv)
{
InitializeLib1();
... /*call lib1 functions*/
TerminateLib1();
InitializeLib2();
... /*call lib2 functions*/
TerminateLib2();
}
When I run this application, I get the following error at runtime:
There can BE only ONE root object.
EXITING
Accepted Answer
More Answers (0)
Categories
Find more on C Shared Library Integration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!