一种可能的原因: If you are using C++, make sure to use extern “C” when calling a C function from a C++ program.
Debug专门用于调试,生成的可执行文件中包含许多调试信息;Release版本则是用于最终发布。
实际上,我生成debug版本就没有上面的错误,是不是要加某些连接库?
You're linking with the wrong set of libraries, what kind of linking do you have? static or DLL? try to change to the DLL version of MFC - on the General tab in project settingsif you are using any DLLs, make sure their versions match (for example, Multithreaded vs. Multithreaded)
yeah,果然也,送分再问:static or DLL 这两种linking的区别?以后编程我怎么知道要用哪个?
static linking ===> put the system library code in your exe, make your exe larger but less dependentdynamic linking ===> use the system library code inside MFC DLLs, make your exe smaller but possible version mismatch with MFC DLLs
static linking ===> put the relevant system library code in your exe, make your exe larger but less dependent
If you are using C++, make sure to use extern “C” when calling a C function from a C++ program.