I got the following problem; I have my super library called mylib: it looks like this:
My project folder is called library...
n
Exit code -1073741515 (0xC0000135)
is STATUS_DLL_NOT_FOUND. This would indicate that the dll isn't available to the program at runtime. In windows, the search path for a dll is as follows:
GetSystemDirectory
function
retrieves the path of this directory.GetWindowsDirectory
function retrieves
the path of this directory.Verify that liblibrary.dll is located in a place it can be found by the executable.
Once you have done that, you may want to add a macro to help you copy the dll to the executable directory as part of your build. This can be done in cmake like so:
add_custom_command(TARGET uselib POST_BUILD # Adds a post-build event to uselib
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
"${PROJECT_SOURCE_DIR}/libs/liblibrary.dll" # this is in-file
$<TARGET_FILE_DIR:uselib>) # this is out-file path