A compact C++ cross-platform library including JSON, XML, HTTP, Sockets, WebSockets, threads, processes, logs, file system, CSV, INI files, vectors and matrices, etc.
Other
69
stars
17
forks
source link
Dynamic library load does not add ".dll" to the library name #25
I've been using the library in the project and I've noticed that despite mentioned in the documentation and as I've checked in the code the extension at least on windows is not added to the string.
here I've setup a completely fresh example for this:
UPDATE:
it seems in Library.h line 132, we need to do like file += "." ASL_LIB_EXT; because we don't have . for sure or change the macros to include . as well.
I've been using the library in the project and I've noticed that despite mentioned in the documentation and as I've checked in the code the extension at least on windows is not added to the string.
here I've setup a completely fresh example for this:
CMakeLists.txt
set(CMAKE_CXX_STANDARD 17) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(LIB_NAME my_lib)
add_library(${LIB_NAME} SHARED my_lib.cpp) target_link_libraries(${LIB_NAME} PUBLIC asls)
add_executable(${PROJECT_NAME} loader.cpp) target_link_libraries(${PROJECT_NAME} PUBLIC asls)
my_lib.h
include "asl/Library.h"
class MyLibBase { public: virtual int get_number() = 0; };
class MyLib : public MyLibBase { public: int get_number() override; };
UPDATE: it seems in
Library.h
line 132, we need to do likefile += "." ASL_LIB_EXT;
because we don't have.
for sure or change the macros to include.
as well.