Skip to content

Instantly share code, notes, and snippets.

@enesusta
Created January 10, 2020 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enesusta/9f7b0835f07dd16fc5b11dc685f08e3a to your computer and use it in GitHub Desktop.
Save enesusta/9f7b0835f07dd16fc5b11dc685f08e3a to your computer and use it in GitHub Desktop.
GCC Linking Script
#!/bin/bash
path=/mnt/c/lib/sqlite
unixPath=/mnt/c/lib/sqlite/unix
java=/usr/lib/jvm/java-11-openjdk-amd64
linking() {
gcc -O3 -shared -Wall \
sqlite.c \
-g -fPIC -Wl,-Bdynamic \
-I${java}/include \
-I${java}/include/linux \
-I${path} \
-lpthread -ldl \
-L${unixPath} -lsqlite3 \
-o hikari.so
}
linking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment