cjson/sqlite README: remove install from source

This commit is contained in:
xushiwei
2024-06-20 00:44:15 +08:00
parent 4a1712f4cd
commit 0c1ef72285
4 changed files with 11 additions and 40 deletions

5
c/c.go
View File

@@ -196,11 +196,6 @@ func Fflush(fp FilePtr) Int
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
//go:linkname Remove C.remove
func Remove(path *Char) Int
// -----------------------------------------------------------------------------
//go:linkname Time C.time //go:linkname Time C.time
func Time(*int32) int32 func Time(*int32) int32

View File

@@ -1,31 +1,19 @@
LLGo wrapper of DaveGamble/cJSON LLGo wrapper of DaveGamble/cJSON
===== =====
[![Build Status](https://github.com/goplus/cjson/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/cjson/actions/workflows/go.yml)
[![GitHub release](https://img.shields.io/github/v/tag/goplus/cjson.svg?label=release)](https://github.com/goplus/cjson/releases)
[![GoDoc](https://pkg.go.dev/badge/github.com/goplus/cjson.svg)](https://pkg.go.dev/github.com/goplus/cjson)
[![Compiler](https://img.shields.io/badge/compiler-llgo-darkgreen.svg)](https://github.com/goplus/llgo)
[![Language](https://img.shields.io/badge/language-Go+-blue.svg)](https://github.com/goplus/gop)
## How to install ## How to install
### on macOS (Homebrew) ### on macOS (Homebrew)
```sh ```sh
brew install cjson brew install cjson
``` ```
### on linux
### on Linux (Debian/Ubuntu)
```sh ```sh
apt-get install -y libcjson-dev apt-get install -y libcjson-dev
``` ```
### from source code
```sh
git clone https://github.com/goplus/cjson.git
cd cjson
git submodule init
git submodule update
mkdir build.dir
cd build.dir
cmake ../cJSON
sudo make install
```
## Demos ## Demos

View File

@@ -1,32 +1,19 @@
LLGo wrapper of sqlite LLGo wrapper of sqlite
===== =====
[![Build Status](https://github.com/goplus/sqlite/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/sqlite/actions/workflows/go.yml)
[![GitHub release](https://img.shields.io/github/v/tag/goplus/sqlite.svg?label=release)](https://github.com/goplus/sqlite/releases)
[![GoDoc](https://pkg.go.dev/badge/github.com/goplus/sqlite.svg)](https://pkg.go.dev/github.com/goplus/sqlite)
[![Compiler](https://img.shields.io/badge/compiler-llgo-darkgreen.svg)](https://github.com/goplus/llgo)
[![Language](https://img.shields.io/badge/language-Go+-blue.svg)](https://github.com/goplus/gop)
## How to install ## How to install
### on macOS (Homebrew) ### on macOS (Homebrew)
```sh ```sh
brew install sqlite3 brew install sqlite3
``` ```
### on linux
### on Linux (Debian/Ubuntu)
```sh ```sh
apt-get install -y libsqlite3-dev apt-get install -y libsqlite3-dev
``` ```
### from source code
```sh
git clone https://github.com/goplus/sqlite.git
cd sqlite
git submodule init
git submodule update
mkdir build.dir
cd build.dir
../sqlite/configure --enable-shared
sudo make install
```
## Demos ## Demos

View File

@@ -2,11 +2,12 @@ package main
import ( import (
"github.com/goplus/llgo/c" "github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/os"
"github.com/goplus/llgo/c/sqlite" "github.com/goplus/llgo/c/sqlite"
) )
func main() { func main() {
c.Remove(c.Str("test.db")) os.Remove(c.Str("test.db"))
db, err := sqlite.Open(c.Str("test.db")) db, err := sqlite.Open(c.Str("test.db"))
check(err, db, "sqlite: Open") check(err, db, "sqlite: Open")