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.
Yes, just putting libcntpr.lib in the linker input for the driver project is working.
Thanks for your help.