[solved] installing SQLite on Windows 7?

Discussion in 'Programming & Software Development' started by oclockforlyfe, Dec 2, 2012.

  1. oclockforlyfe

    oclockforlyfe Member

    Joined:
    Jan 19, 2010
    Messages:
    372
    Location:
    perth
    Has anyone managed to do this? I am running Windows 7 64-bit.

    I've downloaded and extracted a few packages from: http://www.sqlite.org/download.html , including sqlite-amalgamation-3071401.zip, sqlite-autoconf-3071401.tar.gz, sqlite-dll-win32-x86-3071401.zip. I saw these packages mentioned from googling, but I don't know how to make use of them - extracting them provides very few library and header files - actually one dll file, one header file and no include directory. I think I need static library files, and an include directory - like with other libraries.

    The scant info that I can find seem to include Linux commands to to build SQLite in Linux, not Windows. Any help would be appreciated.

    Thanks in advance. :thumbup:
     
    Last edited: Dec 2, 2012
  2. zach

    zach (Banned or Deleted)

    Joined:
    May 1, 2009
    Messages:
    3,614
    Location:
    chermside.bris.qld.au:80
  3. OP
    OP
    oclockforlyfe

    oclockforlyfe Member

    Joined:
    Jan 19, 2010
    Messages:
    372
    Location:
    perth
    Thanks for the reply Zach. :thumbup:

    That package installs a command-line shell for accessing and modifying SQLite databases. I don't want to access SQLite from the command line. I want to access it from an application that I will be coding, using the C API interface.

    I forgot to mention that important point. :D
     
  4. OP
    OP
    oclockforlyfe

    oclockforlyfe Member

    Joined:
    Jan 19, 2010
    Messages:
    372
    Location:
    perth
    Ok, so it turns out that the amalgamation package is all that is needed: sqlite-amalgamation-3071401.zip . The amalgamation is a single file of ANSI-C code that implements the entire SQLite library.

    Just unzip it into a directory. From that directory, add sqlite3.c file to the coding project, and copy sqlite3.h into the project directory. Then just add : #include "sqlite3.h" to the code(for a c program).

    No compiling, no configuring, no making, no building, and no messing with libraries or includes are necessary. It's all been done for you in the amalgamation package. Took about 30 seconds to set up. Tested a sample code and it worked fine.

    Took me 4 hours of googling to find this page, so for anyone who's interested, here's the info.http://www.sqlite.org/howtocompile.html

    Why this important page is buried so deep on the SQLite website is anyone's guess(it's not even under the documentation section at all), because it should be one of the first pages that a user needs to read.
     

Share This Page

Advertisement: