Results 1 to 1 of 1
  1.    #1  

    As newbie using Sourcery G++ Lite and Palm PDK I tried to compile the latest SQLite which I would like to link static to my own webOS application to be able to access SQLite files created on a desktop PC directly without the access limits/restrictions in place when using the webOS HTML5 database access method (only databases created on the device can be accessed...this is a big problem for larger database files).

    The bad thing is so far I only get several warnings (I assume the libpdl warnings are handled when the app is on the device) and some errors.

    Ok, stupid helped to add -c -static -shared as parameters.
    What I still don't know is, if I need to add the -fpic parameter after -shared.
    Whatever...I've got the now.
    I fixed the section of the buildit.cmd posted below. Maybe this helps other people to get on track.

    I downloaded the SQLite Amalgamation package (sqlite-amalgamation- SQLite Download Page

    I started with the buildit.cmd from .\PDK\share\samples\simple\windows directory of the Windows SDK/PDK package (build 465?).
    I installed the latest Sourcery G++ Lite (latest version) toolchain package.

    Changes the original buildit.cmd are...
    set SRC=sqlite3.c
    @rem List the libraries needed
    set LIBS=-lpdl -ldl -pthread
    @rem Name your output executable
    if %PRE% equ 0 if %PIXI% equ 0 goto :END
    if %DEBUG% equ 1 (
       set DEVICEOPTS=-g -c -static -shared
    ) else (
       set DEVICEOPTS=-c -static -shared
    arm-none-linux-gnueabi-gcc %DEVICEOPTS% -o %OUTFILE% .\src\%SRC% "-I%PALMPDK%\include" "-I%PALMPDK%\include\SDL" "-L%PALMPDK%\device\lib" -Wl,--allow-shlib-undefined %LIBS%
    As you might have noticed I removed the SDL and GLESv2 stuff from the LIBs variable as I don't need that graphic stuff for SQLite. Instead I added libld and libpthread to remove errors showing up (undefined reference to ...) without those libs.

    In the arm-none-linux... line I only removed one dot from the original ..\src\... line to match my directory layout:
     +--src\    <--- the sqlite source files are here
    The source should be build for PIXI to work on PRE as well as on the PIXI.

    Fixed it myself...
    Last edited by magog96; 07/21/2010 at 04:45 PM.

Posting Permissions