From 95d254856ab2e21ae87290e5549bd84d3b2be5bc Mon Sep 17 00:00:00 2001 From: Harvey Fong Date: Tue, 17 Jun 2025 18:21:35 -0600 Subject: [PATCH] fixed error while loading shared libraries: libraylib.so.550 in makefile, adjusted Linux build notes --- README.md | 6 ++++-- makefile | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a9abb3c..4d48235 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ workdir/ # MacOS ``` -curl -LO https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-macos-universal.dmg -open cmake-3.31.6-macos-universal.dmg cd ~ mkdir workdir cd workdir +curl -LO https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-macos-universal.dmg +open cmake-3.31.6-macos-universal.dmg curl -LO https://downloads.bellarender.com/bella_engine_sdk-24.6.0.dmg hdiutil attach bella_engine_sdk-24.6.0.dmg cp -R /Volumes/Bella\ Engine\ SDK\ 24.6.0/bella_engine_sdk . @@ -37,6 +37,7 @@ git clone https://github.com/oomer/oom.git git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git cd poomer-raylib-bella_onimage make +bin/Darwin/release/poomer-raylib-bella_onimage ``` # Linux @@ -60,6 +61,7 @@ git clone https://github.com/oomer/oom.git git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git cd poomer-raylib-bella_onimage make +bin/Linux/release/poomer-raylib-bella_onimage -h ``` diff --git a/makefile b/makefile index 8676814..31d0255 100644 --- a/makefile +++ b/makefile @@ -73,7 +73,9 @@ else SDK_LIB_EXT = so SDK_LIB_FILE = lib$(BELLA_SDK_NAME).$(SDK_LIB_EXT) # Dynamic raylib library - RAYLIB_LIB_NAME = libraylib.$(SDK_LIB_EXT) + RAYLIB_LIB_NAME = libraylib.so.550 + RAYLIB_LIB_SONAME = libraylib.so.550 + RAYLIB_LIB_LINK = libraylib.so # Compiler settings CC = gcc @@ -155,7 +157,9 @@ ifeq ($(PLATFORM), Darwin) @cp -P $(RAYLIB_LIB_PATH)/libraylib.550.dylib $(BIN_DIR)/ @cp -P $(RAYLIB_LIB_PATH)/libraylib.dylib $(BIN_DIR)/ else - @cp $(RAYLIB_LIB_PATH)/$(RAYLIB_LIB_NAME) $(BIN_DIR)/$(RAYLIB_LIB_NAME) + @# Copy raylib shared library files for Linux + @cp $(RAYLIB_LIB_PATH)/$(RAYLIB_LIB_NAME) $(BIN_DIR)/ + @ln -sf $(RAYLIB_LIB_NAME) $(BIN_DIR)/$(RAYLIB_LIB_LINK) endif @echo "Build complete: $(OUTPUT_FILE)" @@ -170,7 +174,7 @@ clean: ifeq ($(PLATFORM), Darwin) rm -f $(BIN_DIR)/libraylib*.dylib else - rm -f $(BIN_DIR)/$(RAYLIB_LIB_NAME) + rm -f $(BIN_DIR)/libraylib*.so* endif rmdir $(OBJ_DIR) 2>/dev/null || true rmdir $(BIN_DIR) 2>/dev/null || true