From 0d10af1bd6e34c24421385be14e85b213d9663cc Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Fri, 24 Jun 2022 16:50:41 +0200 Subject: [PATCH] do not use the lib prefix for library names --- build.sh | 9 ++++----- src/lib/{libnbt.cpp => nbt.cpp} | 0 src/lib/{libnbt.h++ => nbt.h++} | 0 src/tools/dumpnbt.cpp | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) rename src/lib/{libnbt.cpp => nbt.cpp} (100%) rename src/lib/{libnbt.h++ => nbt.h++} (100%) diff --git a/build.sh b/build.sh index 4ce9c92..73087e0 100755 --- a/build.sh +++ b/build.sh @@ -25,18 +25,17 @@ wait # Or can we? Idk, cba to find out. # How to build a tool: Tell the compiler where to find shared libraries and -# which libraries to use. +# which libraries to use. # Example: shared libraries are in bin/lib => -Lbin/lib -# one of the libraries in that directory is libnbt.so -# => use with -lnbt (omit prefix lib and suffix .so) +# one of the libraries in that directory is nbt.so => use with -l:nbt.so # How to run a tool: specify the library path to use for the dynamic linker -# when running a program +# when running a program # Example: LD_LIBRARY_PATH=bin/lib bin/tools/dumpnbt echo "Building tools..." mkdir -pv bin/tools # add compile commands to this variable COMPILE_COMMANDS=" set -v -$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -lnbt -o bin/tools/dumpnbt & +$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -l:nbt.so -o bin/tools/dumpnbt & " sh <<< $COMPILE_COMMANDS diff --git a/src/lib/libnbt.cpp b/src/lib/nbt.cpp similarity index 100% rename from src/lib/libnbt.cpp rename to src/lib/nbt.cpp diff --git a/src/lib/libnbt.h++ b/src/lib/nbt.h++ similarity index 100% rename from src/lib/libnbt.h++ rename to src/lib/nbt.h++ diff --git a/src/tools/dumpnbt.cpp b/src/tools/dumpnbt.cpp index 6071984..929243a 100644 --- a/src/tools/dumpnbt.cpp +++ b/src/tools/dumpnbt.cpp @@ -1,4 +1,4 @@ -#include "../lib/libnbt.h++" +#include "../lib/nbt.h++" int main(int argc, char* argv[]) { return 0;