04-13-2012 09:00 AM
Hi
I am very new to blackberry ndk development. I have a project already developed in c/c++. which depends on one or more static librarries developed in c/c++ by me. now when i compile static libraries IDE (QNX momentics) report no errors and creates .a files but when i want to compile main project then it recompile static libraries and report errors in those static libraries. can any body guide me where might be the problem!
Regards
Ahsan
04-13-2012 11:01 PM
I think it would be easier for us to help if you could let us know what kind of error you got, better to list some (maybe the first).
If I get what you mean, you are able to build .a if do it along, but if you need to make an app which depends on these static libs, the IDE will at that time rebuild these libs, and this time it failed the compile and cannot build the .a, right?
If so, this is indeed strange.
One possible issue occurs to me is whether the Target type (Device-Debug / Device-Release / or even Simulator) is the same of the static lib you built and app you want to build. I think if the type is same IDE will not rebuild the lib. And if type is incorrect, it might happens that the code could pass the build for Simulator target but fail for Device-Release target.
This is only a guess.
Or if the app failed in link phase, there will be a lot of possibilities...
04-16-2012 08:05 AM
It seems that those are linking errors as most of the errors are like
"undefined reference to `eglBindAPI'", actually i am C#.net programmer there u only need to add a reference to assembly(dll) and u are done. I do it that way here but nothing seems to work
Regards
Ahsan
04-16-2012 12:10 PM
Have u include the header file?
Have you point to the .so library?
04-16-2012 09:30 PM
Then it is much simpler. I guess you need to add more shared library to your project. For example the error you got means you need to add EGL to lib (possibly also GLESv1_CM or GLESv2).
04-17-2012 05:41 AM
Hi Guys!
Thankyou very much for helping me out, now i have successfully compiled the application there are no compilation/linking errors but bar file is not generated, what could be the reason.
please help.
Regards
Ahsan
04-17-2012 05:48 AM
For me, the QNX IDE generate the bar file when I am deploying the app to device.
There are command line tool to generate bar file (should be in bbndk-2.0.0/host/[host]/x86/usr/bin), but I haven't tried them.
04-17-2012 06:14 AM
Hi
I am experiencing this "cannot find -lfreetype2" even i have added freetype2 to my project,
Regards
Ahsan
04-17-2012 06:31 AM
There is no freetype2, just freetype (yes, it is the 2). Use -lfreetype instead.
You could see (almost) all libs in bbndk-2.0.0/target/qnx6/armle-v7/lib and bbndk-2.0.0/target/qnx6/armle-v7/usr/lib.
11-19-2012 09:11 AM
I got the same problem(cannot find lfreetype2), but how to link against lfreetype ?
waiting!
Regards!