From: Yu Sheng on 28 May 2010 11:41 My C++ code calls a shared library (called libcomps.so) generated by compile my MATLAB code with mcc. I followed the routines to call the library with code: mclmcrInitialize(); if (!mclInitializeApplication(NULL,0)) { std::cerr << "could not initialize the application properly" << std::endl; setup = false; return; } if( !libcompsInitialize() ) { std::cerr << "could not initialize the library properly" << std::endl; setup = false; return; } If the code is compiled with MATLAB 2008b, everything works fine. However, if it is compiled with MATLAB 2009b or 2010a, the program will crash with a segmentation fault when calling libcompsInitialize(); The backtrace shows that the code crashed due to a pthread_join() call in boost. By the way, the call to the shared library is done in a separate thread generated with pthread. I am working on Fedora 9 and my code is compiled with gcc 4.3.0. Does anyone have a solution to this problem? Thanks a lot
|
Pages: 1 Prev: randn: How to use seed Next: Setting z scale in mesh plots |