且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

切换到/ MDd时_initp_misc_cfltcvt_tab和_FPinit

更新时间:2022-11-11 12:09:25

您好OZ,


这个问题似乎是由使用不同版本的运行时库引起的。那么你在项目中使用任何库或DLL吗?如果是,请使用相同的运行时库构建所有项目,项目属性 - > C ++ - >代码生成 - >运行时
库。


有关  c ompiling和链接问题的详细信息
引起的问题运行时库,请检查此doucment。


链接器工具错误LNK2001


祝你好运,


Shu


I switched my Visual C++ 2012 project from Multi-threaded Debug (/MTd) to Multi-threaded Debug DLL (/MDd). The project is a mixture of C++ .vcxproj and Intel Fortran (.vfproj) projects. After all is rebuild I get the errors below. 

In CRT source code I see the offending symbols are defined in crt0dat.c if CRTDLL symbol is _not_ defined. How do I make sure I get crt0dat with CRTDLL when compiling main application?

Any other suggestions how do I troubleshoot this?

50>cmain.obj : error LNK2019: unresolved external symbol _initp_misc_cfltcvt_tab referenced in function wWinMain
50>cmain.obj : error LNK2001: unresolved external symbol _FPinit
50>C:\spm\git\clones\SPM80_dll\MSBuild\x64\dll_debug\SPM_dll_debug_x64.exe : fatal error LNK1120: 2 unresolved externals

O.Z.

Hi O.Z,

It seems that this issue is caused by using different version of runtime library. So are you using any library or dll in your project? If yes, please build all your project with the same runtime library, Project properties-> C++->Code generation->runtime library.

For more information about compiling and linking Problems caused by runtime library, please check this doucment.

Linker Tools Error LNK2001

Best regards,

Shu