Visual C++ 2015 generates no leading "_"

61 Views Asked by At

I'm creating dlls now for a long time, but I'm a bit curious about a problem which arised in my new project, the first one with VS C++ 2015.

Its nothing special, a simple C++ project, creating a windows 32/64 Bit dll. I'm exporting my functions as "C" like this (no DEF file):

extern "C" void __declspec(dllexport) foo();

But my application loading the dll fails with Can not find _foo(). Checking the dll with the Dependency Walker shows me foo() is exported, but without the obligatory leading _.

I can not find a compiler/linker option having an effect in the creation of the exported function names.

0

There are 0 best solutions below