diff --git a/CMakeLists.txt b/CMakeLists.txt index 1242058..4b93c32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,9 @@ file(GLOB_RECURSE NEKOHACK_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") add_library(nekohack STATIC ${NEKOHACK_SOURCES}) target_include_directories(nekohack PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/hack") target_include_directories(nekohack PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include/") +target_link_libraries(nekohack PUBLIC dl) add_library(nekohack-dummy SHARED "${CMAKE_CURRENT_SOURCE_DIR}/example/dummy.cpp") add_executable(nekohack-example "${CMAKE_CURRENT_SOURCE_DIR}/example/main.cpp") target_include_directories(nekohack-example PRIVATE nekohack) -target_link_libraries(nekohack-example PRIVATE nekohack nekohack-dummy dl) +target_link_libraries(nekohack-example PRIVATE nekohack nekohack-dummy) diff --git a/src/sharedlibrary.cpp b/src/sharedlibrary.cpp index c0c1d17..3bf4b8f 100644 --- a/src/sharedlibrary.cpp +++ b/src/sharedlibrary.cpp @@ -18,7 +18,7 @@ */ #include -#include + #include "memory.hpp" #include "sharedlibrary.hpp" @@ -47,7 +47,6 @@ void SharedLibrary::Init(std::string_view _name){ Passthrough pass; pass.name = '/' + std::string(_name) + '.'; if (!dl_iterate_phdr([](struct dl_phdr_info* info, size_t, void* _pass) { - std::cout << "Lib: " << info->dlpi_name << std::endl; auto* pass = reinterpret_cast(_pass); if (!strstr(info->dlpi_name, pass->name.c_str())) return 0;