Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Developer
rmisk
Posts: 64
Registered: ‎02-21-2012
My Carrier: None
Accepted Solution

Build Error With sqlite3 Library

A project builds with no problems until I add the sqlite3 library with which I get the following build error:

 

/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib/libsqlite3.so: undefined reference to `uncompress'
cc: /mnt/Projects/PlayBook/bbndk-2.0.0/host/linux/x86/usr/bin/ntoarm-ld error 1

 

Using NDK 2.0 on Kubuntu 11.10

 

Any suggestions on what I am not doing correctly.

 

Roger

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 539
Registered: ‎11-29-2011
My Carrier: other

Re: Build Error With sqlite3 Library

Sounds like you need to add libz to your project.  The examples I've seen that have sqlite3 in their libs list also have z.

 

Cheers,

Sean

Please use plain text.
Developer
rmisk
Posts: 64
Registered: ‎02-21-2012
My Carrier: None

Re: Build Error With sqlite3 Library

[ Edited ]

Thanks for the suggestion, but it didn't work in that the file could not be found.  

 

The build error message displayed was:

 

**** Internal Builder is used for build ****
qcc -o src/main.o ../src/main.c -V4.4.2,gcc_ntoarmv7le -w1 -I/mnt/Projects/PlayBook/bbndk-2.0.0/target/qnx6/usr/include/freetype2 -I/mnt/Projects/PlayBook/bbndk-2.0.0/target/qnx6/../target-override/usr/include -D_FORTIFY_SOURCE=2 -c -g -fstack-protector-all
qcc -o myTracker src/main.o -lbps -lpps -lscreen -llibz -lsqlite3 -V4.4.2,gcc_ntoarmv7le -w1 -g -Wl,-z,relro -Wl,-z,now

-L/mnt/Projects/PlayBook/bbndk-2.0.0/target/qnx6/../target-override/armle-v7/lib

-L/mnt/Projects/PlayBook/bbndk-2.0.0/target/qnx6/../target-override/armle-v7/usr/lib


/mnt/Projects/PlayBook/bbndk-2.0.0/host/linux/x86/usr/bin/ntoarm-ld: cannot find -llibz


cc: /mnt/Projects/PlayBook/bbndk-2.0.0/host/linux/x86/usr/bin/ntoarm-ld error 1


Build error occurred, build is stopped

 

Note: formating above was added manually.

 

Would you please send me the location of the example files using sqlite3?

 

Roger

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 539
Registered: ‎11-29-2011
My Carrier: other

Re: Build Error With sqlite3 Library

You added "libz" to your libs instead of just "z".  You can see this here:

 

qcc -o myTracker src/main.o -lbps -lpps -lscreen -llibz -lsqlite3 -V4.4.2,gcc_ntoarmv7le -w1 -g -Wl,-z,relro -Wl,-z,now
-L/mnt/Projects/PlayBook/bbndk-2.0.0/target/qnx6/../target-override/armle-v7/lib -L/mnt/Projects/PlayBook/bbndk-2.0.0/target/qnx6/../target-override/armle-v7/usr/lib

 

You want -lz.  There is no such thing as liblibz.

 

Cheers,

Sean

 

Please use plain text.
Developer
rmisk
Posts: 64
Registered: ‎02-21-2012
My Carrier: None

Re: Build Error With sqlite3 Library

Thanks Sean

Please use plain text.