Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(XilEnvRpc PRIVATE /wd5105)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# do not as "lib" before the DLL name
# do not add "lib" before the DLL name
set(CMAKE_SHARED_LIBRARY_PREFIX "")
target_compile_definitions(XilEnvRpc PRIVATE WINVER=0x0600)
target_compile_definitions(XilEnvRpc PRIVATE _WIN32_WINNT=0x0600)
Expand Down Expand Up @@ -401,6 +401,14 @@ else()
./Userguide/OpenXiL_Userguide.pdf
DESTINATION ${CMAKE_INSTALL_PREFIX}
)
else()
# copy the 32-bit mingw dlls into the Bin32 folder
cmake_path(GET CMAKE_C_COMPILER PARENT_PATH C_COMPILER_PATH)
message("C_COMPILER_PATH")
message(${C_COMPILER_PATH})
INSTALL(DIRECTORY "${C_COMPILER_PATH}/"
DESTINATION ${CMAKE_INSTALL_PREFIX}${XilEnvExtProcLibPath}
FILES_MATCHING PATTERN "*.dll")
endif()

if(${MY_CMAKE_SIZEOF_VOID_P} GREATER 4)
Expand Down
2 changes: 1 addition & 1 deletion Src/ExternalProcess/XilEnvExtProcMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ XilEnvFunctionCallPointer GetXilEnvFunctionCallPointer(int par_FunctionNr, const
#ifdef _MSC_VER
#pragma warning(pop)
#endif
DllFunctionCache.hModulDll = LoadLibraryA (DllFunctionCache.DllNameWithPath);
DllFunctionCache.hModulDll = LoadLibraryExA (DllFunctionCache.DllNameWithPath, NULL, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
if (DllFunctionCache.hModulDll == NULL) {
char *lpMsgBuf = NULL;
DWORD dw = GetLastError ();
Expand Down