Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
12-18-2012 07:43 PM - edited 12-19-2012 05:32 PM
I've created a shared library using the managed build system and one of the classes in the library uses Qt signals and slots. When I create a cascades app I can add the library to my project and everything seems alright. However when I compile the app which uses the lib I get the following errors.
qcc -Vgcc_ntox86 -lang-c++ -Wl,-rpath-link,C:/bbndk/target_10_0_9_1673/qnx6/x
86/lib -Wl,-rpath-link,C:/bbndk/target_10_0_9_1673/qnx6/x 86/usr/lib -Wl,-rpath-link,C:/bbndk/target_10_0_9_1673/qnx6/x 86/usr/lib/qt4/lib -o o-g/simplehttp o-g/.obj/Simplehttp.o o-g/.obj/main.o o-g/.obj/moc_Simplehttp.o -LC:/bbndk/target_10_0_9_1673/qnx6/x86/lib -LC:/bbndk/target_10_0_9_1673/qnx6/x86/usr/lib -LC:/bbndk/target_10_0_9_1673/qnx6/x86/usr/lib/qt4 /lib -LC:/bbndk/target_10_0_9_1673/qnx6/armle-v7/usr/li b/qt4/lib -L../../simplehttplib/Device-Debug -L../../simplehttplib/Device-Release -L../../simplehttplib/Simulator-Debug -lsimplehttplib -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps Could not find qmake configuration directoryCould not find qmake configuration fileUsing OS scope before setting MAKEFILE_GENERATORC:\bbndk\host_10_0_9_404\win32\x 86\usr\bin\ntox86-ld: skipping incompatible ../../simplehttplib/Device-Debug/libsimplehttplib. so when searching for -lsimplehttplib C:\bbndk\host_10_0_9_404\win32\x86\usr\bin\ntox86- ld: skipping incompatible ../../simplehttplib/Device-Release/libsimplehttpli b.so when searching for -lsimplehttplib ../../simplehttplib/Simulator-Debug/libsimplehttpl ib.so: undefined reference to `PostHttp::staticMetaObject' ../../simplehttplib/Simulator-Debug/libsimplehttpl ib.so: undefined reference to `vtable for PostHttp' make: Leaving directory `C:/projects/bbworkspace/simplehttp/x86' ../../simplehttplib/Simulator-Debug/libsimplehttpl ib.so: undefined reference to `RequestHeaders::complete(QString const&)' make: Leaving directory `C:/projects/bbworkspace/simplehttp/x86' ../../simplehttplib/Simulator-Debug/libsimplehttpl ib.so: undefined reference to `PostHttp::complete(QString const&)' ../../simplehttplib/Simulator-Debug/libsimplehttpl ib.so: undefined reference to `vtable for RequestHeaders' cc: C:/bbndk/host_10_0_9_404/win32/x86/usr/bin/ntox86- ld caught signal 1 make: *** [o-g/simplehttp] Error 1 make: *** [debug] Error 2 make: *** [Simulator-Debug] Error 2
After some googling I believe the error is due to moc not being run to provide the implementations for signals and slots in the shared library. I've come across this page https://developer.blackberry.com/cascades/referenc
Solved! Go to Solution.
12-19-2012 05:34 PM
I also tried to compile this LGPL OAuth library (https://github.com/blackberry/bb-cascades-oauth) into a shared library so I can use it with my cascades app and I ran into the same issues. Just need to figure out how to call moc when compiling the lib I'm thinking.
12-20-2012 11:10 PM
I created a python script to do this. It scans the supplied header dir recursively, I put it on Github in case it helps anyone: https://github.com/chrisandrewca/mocpy
12-21-2012 10:30 AM - edited 12-21-2012 10:32 AM
These articles have some good shared lib info and show you how to create one:
12-28-2012 03:46 AM
@chrisandrewca, i think your method is good. but i dont wanto manual create moc_xxx.cpp because if .h file are modified about qt , i have to recreate the moc_XXXX.cpp . any suggestion?thanks