简体   繁体   English

使用intel c ++编译“ cin >> a >> b”时出错,在发行版中进行编译

[英]Compile error with “cin >> a >> b” with intel c++ compile in release version

When I use the intel C++ compiler with VS2015 to compile a release version, it will fail. 当我将intel C ++编译器与VS2015一起使用来编译发行版时,它将失败。 But when I compile a debug version, it work. 但是,当我编译调试版本时,它可以工作。 I can't understand what happen. 我不明白会发生什么。 It the configure have some wrong? 它的配置有一些错误吗? The error list is in below. 错误列表在下面。 How can I do? 我能怎么做?

--edit-- - 编辑 -

Today I compare the configure between the debug version and the release version in each option, I finally find if I set interprocedural optimization to no or single-file(/Qip), it works. 今天,我在每个选项中比较了调试版本和发行版本之间的配置,最终发现是否将过程间优化设置为no或单个文件(/ Qip),它可以工作。 But if i set the interprocedural optimization to Multi-File(/Qipo), it doesn't work. 但是,如果我将过程间优化设置为“ Multi-File(/ Qipo)”,则它不起作用。 Besides, I can't find the iostream in the intel C++ compiler include path, the project seem like to use the library in VC++, it that the reason why I can't compile? 另外,我在intel C ++编译器的include路径中找不到iostream,该项目似乎要在VC ++中使用该库,那我为什么不能编译? How can I solve this problem? 我怎么解决这个问题? Thanks a lot. 非常感谢。

warn #11021 unresolved __imp_?_Src@?3??_Getffld@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@3@1AAVios_base@3@PAH@Z@4QBDB test 1 警告#11021未解决__imp _?_ Src @?3 ?? _ Getffld @?$ num_get @ DV?$ istreambuf_iterator @ DU?$ char_traits @ D @ std @@ std @@ std @@ ABAHPADAAV?$ istreambuf_iterator @ DU?$ char_traits @ D @ std @@@@ 3 @ 1AAVios_base @ 3 @ PAH @ Z @ 4QBDB测试1

error #11023 Not all components required for linking are present on command line test 1 错误#11023在命令行测试1上并没有链接所需的所有组件

#include<iostream>
using namespace std;

int main()
{
    int a, b;
    while (cin >> a >> b)
    cout << a << ' ' << b;
    return 0;
}

After I asking in the intel developer zone. 之后,我在英特尔开发人员专区问。 They tell me the issue is ONLY reproducible with /MD and /Qipo used together, so I may use /MT to work around it. 他们告诉我这个问题只能与/ MD和/ Qipo一起使用才能重现,因此我可以使用/ MT来解决。 And when I use /MT, it works. 当我使用/ MT时,它可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM