diff --git a/base/applications/network/telnet/CMakeLists.txt b/base/applications/network/telnet/CMakeLists.txt index 4f369a8c8dc..595fe245367 100644 --- a/base/applications/network/telnet/CMakeLists.txt +++ b/base/applications/network/telnet/CMakeLists.txt @@ -1,4 +1,6 @@ -add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +add_definitions( + -D_CRT_NONSTDC_NO_DEPRECATE + -D_DLL -D__USE_CRTIMP) set_cpp() diff --git a/base/applications/winhlp32/CMakeLists.txt b/base/applications/winhlp32/CMakeLists.txt index 76b82883b1e..3dfd37d8503 100644 --- a/base/applications/winhlp32/CMakeLists.txt +++ b/base/applications/winhlp32/CMakeLists.txt @@ -5,7 +5,8 @@ add_definitions( -D__ROS_LONG64__ -D_CRT_NONSTDC_NO_DEPRECATE -Dfileno=_fileno - -Disatty=_isatty) + -Disatty=_isatty + -D_DLL -D__USE_CRTIMP) add_executable(winhlp32 callback.c diff --git a/base/shell/explorer/CMakeLists.txt b/base/shell/explorer/CMakeLists.txt index 45b91bf6643..cc61b33841d 100644 --- a/base/shell/explorer/CMakeLists.txt +++ b/base/shell/explorer/CMakeLists.txt @@ -8,8 +8,10 @@ set_unicode() #jgardou #set_cpp() -add_definitions(-DWIN32) -add_definitions(-D__WINDRES__) +add_definitions( + -DWIN32 + -D__WINDRES__ + -D_DLL -D__USE_CRTIMP) #add_pch(explorer ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h SOURCE) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -47,7 +49,7 @@ list(APPEND SOURCE utility/dragdropimpl.cpp utility/utility.cpp utility/xmlstorage.cpp - utility/splitpath.c +# utility/splitpath.c msvcrt has _wsplitpath already utility/window.cpp utility/shellbrowserimpl.cpp) # utility/shelltests.cpp @@ -78,7 +80,7 @@ target_link_libraries(explorer -lmsvcrt -lkernel32 -lntdll) - + set_image_base(explorer 0x00400000) add_dependencies(explorer psdk buildno_header) diff --git a/lib/3rdparty/stlport/CMakeLists.txt b/lib/3rdparty/stlport/CMakeLists.txt index e48de4e060f..57f60d33159 100644 --- a/lib/3rdparty/stlport/CMakeLists.txt +++ b/lib/3rdparty/stlport/CMakeLists.txt @@ -2,7 +2,9 @@ #uncomment this if you want to test c++ compilation #add_subdirectory(test) -add_definitions(-D_STLP_USE_EXCEPTIONS) +add_definitions( + -D_STLP_USE_EXCEPTIONS + -D_DLL -D__USE_CRTIMP) set_cpp() diff --git a/toolchain-mingw32.cmake b/toolchain-mingw32.cmake index 6281b24d19d..9ad3cea4c37 100644 --- a/toolchain-mingw32.cmake +++ b/toolchain-mingw32.cmake @@ -38,10 +38,10 @@ set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries") set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "Standard C++ Libraries") if(ARCH MATCHES i386) -set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--enable-stdcall-fixup -Wl,--kill-at") +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--enable-stdcall-fixup -Wl,--kill-at -Wl,--disable-auto-import") #-Wl,-T,${REACTOS_SOURCE_DIR}/global.lds elseif(ARCH MATCHES amd64) -set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--enable-stdcall-fixup -Wl,--kill-at") +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base -Wl,--enable-stdcall-fixup -Wl,--kill-at -Wl,--disable-auto-import") endif(ARCH MATCHES i386) # adjust the default behaviour of the FIND_XXX() commands: