From e93434b04c4dd3f10149955978a2138bc0c4218b Mon Sep 17 00:00:00 2001 From: endyul Date: Sun, 4 Jun 2017 15:59:33 +0800 Subject: [PATCH] disable boost autolinking on windows https://stackoverflow.com/questions/40179034/lnk1104-cannot-open-file-libboost-random-vc140-mt-1-61-lib-and-others --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d05ad601a..b141b503a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,7 @@ elseif(MINGW) set(CMAKE_CXX_FLAGS "-std=c++0x") elseif(MSVC) add_definitions(-D_WINDOWS) # make dynet happy at `dynet/mem.cc(7)` + add_definitions(-DBOOST_ALL_NO_LIB) # disable boost auto-linking on windows set(CMAKE_CXX_FLAGS "/EHsc") endif(APPLE)