SergiusTheBest / FindWDK

CMake module for building drivers with Windows Development Kit (WDK)
BSD 3-Clause "New" or "Revised" License
251 stars 53 forks source link

DriverEntry not working on windows7 X64 #13

Closed ddkwork closed 4 years ago

ddkwork commented 4 years ago

hello again, if set this:

string(CONCAT WDK_LINK_FLAGS
#        "/ENTRY:DriverEntry "  

why this do not work,if modifly DriverEntry to FxDriverEntry,sys load ok,but build err so.

then i creat vsproject use cmakeGUI, i found the complie is FxDriverEntry, and i delete Fx, the sys file was loaded on win7. so my problen is how to set: "/ENTRY:DriverEntry " ? thx.

SergiusTheBest commented 4 years ago

Why are you changing it?

ddkwork commented 4 years ago

你为什么要改变它?

Because if do not change to drivrentry the sys can't load.

SergiusTheBest commented 4 years ago

I checked and it was loaded with no issues. Could you post your cmake code here?

ddkwork commented 4 years ago

cmake_minimum_required(VERSION 3.7) project(hvm) set(CMAKE_CXX_STANDARD 17) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../FindWDK") find_package(WDK REQUIRED) include_directories( phnt ia32-doc/out ) enable_language(ASM_MASM) wdk_add_driver(hvm KMDF 1.15 main.cpp base.h struct.h vmxdefs.asm archdefs.asm ) target_link_libraries(hvm "${CMAKE_CURRENT_LIST_DIR}/lib/LDE64x64.lib")