언어 설정

Menu
Sites
Language
Problems with shared libraries

Hello there,

just installed Tizen 2.0 SDK and began playing. Created a Native project (OpenGL) which compiles and runs fine on the simulator.

Then I create a Native Shared Library with the default template, which only exports a class and a function. As soon as I link the OpenGL sample with the Native Library (and I don't modify sample code, I don't call anything in the Native Library), I get a crash in the debugger, even before reaching _EXPORT_ int OspMain(int argc, char *pArgv[])!

Of course, I don't even have a meaningful call stack to know where it crashes.

Question: is Shared Library support working in Simulator mode? Or did something go wrong with my installation?

Thanks for your help.

Michael

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 댓글
Michael EL BAKI
I am now almost sure this is a problem in the Tizen SDK. I have recompiled my own library, which is fairly complex. It contains lots of C++ classes, is multithreaded, opens http connections, parses XML and JSON files, and everything works fine if it's compiled as a Static Library. As soon as I use the Dynamic Library version, it will crash on startup, before OspMain. And this is also the case with a minimalist Dynamic Library generated by the SDK/IDE. Anyone can tell me if this is supposed to be fixed? Does it work on device? We don't have devices here... Thanks!
Young Cho
It is hard to say anything about the issue without checking for log message. Anyway, the static initialization of the classes in the library may be the direct cause of the issue. Would you get rid of the static classes and test the scenario please?
Mohan Kumar
Hi, I need to write an sample application which should be multi threaded, opens socket connection, parsing the xml file and calling the shared library. as i saw your implmenetation, i need to write same kind. can you suggest me ?
Young Ik Cho
Would you try following steps to acquire the log? 1. try "sdb shell" to connect the shell 2. try "su" to switch user 3. try "dlogctrl set platformlog 1" to enable platform log on 4. reboot the device and connect the device by the step 1 5. try "dlogutil" to acquire the log