Link SerCx2 in Visual Studio

Jesper 1 Reputation point
2021-06-24T12:40:33.41+00:00

I'm trying to develop a device driver using SerCx2, but I have trouble compiling the driver.
I'm using VS2019 and have installed the latest SDK and WDK, and have created a sample KMDF driver project. This builds just fine and is working.

But when I try to use SerCx2, i run into some issues.
First of all, #include <sercx.h> doesn't work, I get "file not found" when compiling.
I can include the header using #include <sercx/2.0/sercx.h>, then the compiler does find it. But instead, I get linker errors like this:

Error LNK1120 2 unresolved externals KMDF Driver1 C:\Users\dev\source\repos\KMDF Driver1\x64\Debug\KMDFDriver1.sys 1
Error LNK2001 unresolved external symbol SercxDriverGlobals KMDF Driver1 C:\Users\dev\source\repos\KMDF Driver1\KMDF Driver1\Driver.obj 1
Error LNK2001 unresolved external symbol SercxFunctions KMDF Driver1 C:\Users\dev\source\repos\KMDF Driver1\KMDF Driver1\Driver.obj 1

I.e the linker doesn't find the required files.
Seems as the SerCx2 isn't included in the project. Do I need to add it to the project somehow?

I found some different settings in Properties -> Driver Settings, where you can enable "Link to the xxxxxxxxx Class Extension", but none of them are related to SerCx2.

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,541 questions
0 comments No comments
{count} votes