Why do I get a runtime error when I try to link against multiple Compiler generated libraries that link against the Graphics library?
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!