Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/CppSQLite3.o
Binary file not shown.
69 changes: 69 additions & 0 deletions src/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# CppSQLite Installation Guide

This guide will help you build and test the CppSQLite library on your system.

## Prerequisites

Before you begin, make sure you have:
- A C++ compiler (g++)
- SQLite3 development libraries installed on your system
- Git (to clone the repository)

## Step-by-Step Installation

### 1. Clone the Repository
First, download the CppSQLite source code from GitHub:
```bash
git clone https://github.com/neosmart/CppSQLite
```

### 2. Navigate to the Source Directory
Change to the source code directory:
```bash
cd CppSQLite/src
```

### 3. Compile the CppSQLite Library
Compile the main CppSQLite source file into an object file:
```bash
g++ -c CppSQLite3.cpp -o CppSQLite3.o
```

### 4. Create the Static Library
Create a static library file that you can link against in your projects:
```bash
ar rcs libCppSQLite3.a CppSQLite3.o
```

### 5. Build and Run the Test Program
Compile the test program and link it with the CppSQLite library and SQLite3:
```bash
g++ test.cpp -L. -lCppSQLite3 -lsqlite3
```

### 6. Verify the Installation
Run the test program to make sure everything is working correctly:
```bash
./a.out
```

If the installation was successful, you should see output similar to:
```
Row 1: Alice
Row 2: Bob
CppSQLite basic tests passed!
```

## What's Next?

Once you've successfully built the library, you can:
- Use `libCppSQLite3.a` in your own C++ projects
- Include `CppSQLite3.h` in your source code
- Link against both CppSQLite3 and sqlite3 when compiling your programs

## Troubleshooting

If you encounter any issues:
- Make sure SQLite3 development libraries are installed (`sudo apt-get install libsqlite3-dev` on Ubuntu/Debian)
- Verify that g++ is properly installed and in your PATH
- Check that all files are in the correct directories
Binary file added src/a.out
Binary file not shown.
Binary file added src/libCppSQLite3.a
Binary file not shown.