升级到MSVC 2017后链接错误 [英] Link error after upgrade to MSVC 2017

查看:172
本文介绍了升级到MSVC 2017后链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ALL,


我遇到的问题与
here
,但是MSVC 2017。


我试图添加回复中提到的头文件,但它没有解决问题。


我也尝试过按照链接修复odbccp32,但链接已经死了。



我希望代码与MSVC 2010及更早版本兼容,但是看起来我没有可能这样做。 (我正在使用MSVC IDE,而不是命令行编译)。



关于如何解决这个问题的想法?



谢谢。


解决方案

您是否通过使用
#Pragma从项目属性中使用
Additinal Dependencies ,将所需的库文件添加到您的解决方案中评论("lib","lib路径")。


关于兼容性2017将为您提供向后兼容性,但如果存在哪些内容在2010年工作,而不是在2017年,或者在这种情况下,你必须在你的代码中添加
条件编译 #ifdef 等等。所以它是可行的,但你做到了吗?真的很想花这么多时间搞清楚这一切。如果这是一个小解决方案,那么它是有道理的,否则不建议你采用这个例程。



谢谢


Hi, ALL,

I'm having the same issue as described here, but for MSVC 2017.

I tried to add the header files mentioned in the replies, but it didn't fix the problem.

I also tried to follow the link to fix the odbccp32 but the link is dead.

I would like the code to be compatible with MSVC 2010 and earlier, but it looks like I don't have a possibility to do so. (I'm working from MSVC IDE, not a command line compilation).

Any idea on how to work around this?

Thank you.

解决方案

Did you added the required library file as well to your solution either by using Additinal Dependencies from project properties of by using #Pragma comment("lib"," lib Path") .

Regarding compatibility 2017 will give you backward compatibility but if something is there which work in 2010 and not in 2017 or either way in that case you have to add conditional compilation in your code #ifdef etc.So it's doable but do you really want spend so much time in figuring all of this . if this is a small solution then it make sense else will not suggest you to go with this routine.

Thanks


这篇关于升级到MSVC 2017后链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆