0

I'm trying to compile this DLL code example from this answer:

#include <stdio.h>
​extern "C" {
​__declspec(dllexport)
​void testDLL(const int i) {
    printf("%d\n", i);
}
​} // extern "C"

with

vcvarsall.bat x64 
cl.exe /D_USRDLL /D_WINDLL testDLL.cpp /MT /link /DLL /OUT:testDLL.dll

but I get:

error C2059: syntax error: 'string'

Any idea what could be the reason?

Basj
  • 36,818
  • 81
  • 313
  • 561

0 Answers0