mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-11 09:25:20 +00:00
Fix compilation errors on MinGW (#3217)
Before PR compilation failed because of two errors: 1 - Usage of CMake target_link_libraries() Make Error at CMakeLists.txt:154 (target_link_libraries): The keyword signature for target_link_libraries has already been used with the target "iwasm_shared". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the keyword signature are here: * CMakeLists.txt:148 (target_link_libraries) See https://stackoverflow.com/questions/47737558/uses-of-target-link-libraries-must-be-either-all-keyword-or-all-plain Fixed by adding keyword INTERFACE 2 - Undefined symbols during linkage, fixed by adding -lwsock32.
This commit is contained in:
parent
0ee5ffce85
commit
df57e70437
|
@ -151,7 +151,7 @@ if (WAMR_BUILD_WASM_CACHE EQUAL 1)
|
|||
endif ()
|
||||
|
||||
if (MINGW)
|
||||
target_link_libraries (iwasm_shared -lWs2_32)
|
||||
target_link_libraries (iwasm_shared INTERFACE -lWs2_32 -lwsock32)
|
||||
endif ()
|
||||
|
||||
install (TARGETS iwasm_shared LIBRARY DESTINATION lib)
|
||||
|
|
Loading…
Reference in New Issue
Block a user