USE_LIBCNTPR=1

There used to be this directive USE_LIBCNTPR=1 with the old build system.
How can I accomplish this with a Visual Studio driver project?

You just add libcntpr.lib to the list of libraries to load.

Thanks, however for some reason that didn’t seem to work. I’m trying to use _wcstoui64 and it compiled for me when using the build environment but failed with Visual Studio.

What “didn’t work”? It didn’t compile? Or it didn’t link?

It didn’t link.
There is some quirk which I couldn’t figure out exactly.
If I just use that API in the main driver project and add libcntpr.lib as an input to the linker, it builds fine.
But when I use it in a driver library, it fails to link, either because of unresolved symbol, or because of LNK4217
symbol ‘_wcstoui64’ defined in ‘libcntpr.lib(_wcstoq.obj)’ is imported by ‘Utilities.lib(miscxxx.obj)’ in function ‘Utilxxx’

LNK4217 is just a warning that the symbol was prototyped as an import (__declspec(dllimport) ), but was actually defined as a local symbol. It can be ignored. Did you add your own declaration for this function?

Sorry for late reply - somehow the error got resolved by itself. :wink:
Yes, just putting libcntpr.lib in the linker input for the driver project is working.
Thanks for your help.