10-25-2012 09:44 AM
I'm trying to add a C++ library, but when selecting it from:
Configure / Add Library / External
I get the error: Library is not compiled for the correct architecture: "Library path".
This obviously means that the library is not in the correct architecture. As the library is one made by my company, I can modify it, so I would like to know what is the correct architecture, to be able to port the library to it.
10-26-2012 09:53 AM
Aparently this is not common knoledge. I'll limit myself to more particular questions then. For compiling the library I need to import:
What compilers are supported? Is it fine if I compile with the visual studio default compiler (CL I think it's called)? Or do I need to use a specific one? If so, wich one?
10-26-2012 10:54 AM
I'd go with RIM's NDK (http://developer.blackberry.com/native/ for Playbook)
Note that libraries for Simulator have to be compiled with x86 platfrom, for real PlayBook - with arm.
02-22-2013 02:02 AM
I am getting same kind of error. Please anyone tell me what should be the solution.
And also which library file supported in Blackbery 10. I mean whether it should be .lib extension (windows based) or .a extension (unix based). I have added both files but getting same kind of error.
02-24-2013 11:30 PM
Thanks for the reply.
But if i try to link the .so file, i am getting following error : Library is not compiled for the correct architecture: "Library path"
I followed this link for linking : http://supportforums.blackberry.com/t5/Cascades-De
What should be the solution???
02-25-2013 11:50 AM
I can only repeat: that libraries for Simulator have to be compiled for x86 platfrom, for real PlayBook - for arm. Do you compile your library or use .so file compiled by somebody?
02-25-2013 11:28 PM
Thanks for your reply.
But I am still not able to run it. Can you please provide me sample application. So that i can understand it.
03-05-2013 06:48 PM - edited 03-05-2013 06:49 PM
Hey there sanshah,
I'll see if I can explain it clearly, even though BGmot explained it already. Basically, whatever library you are using you should try to get the source code yourself and compile it yourself. If you're using the NDK for BB10 then that would be great. Just load the source code for the library into NDK and see if you can compile it.
If you cannot get the source code of the library, as BGmot mentioned, you could possibly get the library as a dynamically linked library with the *.so extension from a friend or someone else. The person would have to specify the architecture that you want when compiling. Dynamically linked just basically means the library is separete from the executable and is used when you run the program, not when you compile it. Statically linked (*.a) is combined/linked into the executable when it is compiled.
Running the program in a Simulator would be the same architecture as the platform you are using. Such as x86... If you wanna distribute the program for BB, it would have to be the Arm architecture.
You wanted an example to work with, you can try Box2D, since it is readily available. BGmot is the one that supplied the link in this thread: http://supportforums.blackberry.com/t5/Native-Deve
Box2D is a library needed for the Belligerent Blocks game available here: https://github.com/blackberry/NDK-Samples/tree/mas
Hope that helps you.