码迷,mamicode.com
首页 > 其他好文 > 详细

fatal error LNK _X

时间:2018-03-06 10:52:30      阅读:330      评论:0      收藏:0      [点我收藏+]

标签:默认   ext   源文件   ref   func   stderr   gen   AC   文件   

 1、fatal error LNK1295: ‘/OPT:NOREF‘ not compatible with ‘/LTCG:incremental‘ specification; link without ‘/LTCG:incremental‘

  Properties -> General -> Whole Program Opt -> "No Whole Program Opt"

 

 

2、error LNK2019:unresolved external symbol __imp__fprintf referenced in function _ShowError 

  Properties -> Linker -> Input -> Additional Dependencies -> 添加 “legacy_stdio_definitions.lib;” 

//出现这个问题的原因是vs2015默认编译时将许多标准库采用内联方式处理,因而没有可以链接的标准库文件,所以要专门添加标准库文件来链接标准库中的函数。

 

 3、error LNK2019: unresolved external symbol __imp____iob_func referenced in function _ShowError

  在源文件中添加: extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; }

 

fatal error LNK _X

标签:默认   ext   源文件   ref   func   stderr   gen   AC   文件   

原文地址:https://www.cnblogs.com/-sev-/p/8512900.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!