运行cl.exe时,可以指定警告级别。 cl /W3
cl /W4 # warn even more
cl /Wall # all warnings on
然而,水平最高,/Wall,似乎不切实际的,因为它会触发Windows头文件,如在windef.h(Windows SDK的VS2010)警告。两个最频繁发生的似乎是C4668和C4820。所以,你可以关闭它们: cl /Wall
我有一个简单的C DLL,它公开了静态库中的函数。该DLL编译没有错误,我可以在其上运行DUMPBIN查看导出。然而,当我试图用C#DllImport加载它,它说的: System.DllNotFoundException: Unable to load DLL 'ei.dll': The specified module could not be found. (Exception from H