如何使用英特尔 C++使用 Qt Creator 进行编译
我正在编写一个程序,其中我需要进行大量的数值计算。但自从我在 Qt Creator 中开发程序的前端以来,我一直在与 MinGW 打交道。
因此,有没有办法将英特尔 C++ 编译器与 QT Creator 集成或使用?
目前使用IC++ 11.0和QtCreator 1.2.1
I am writing a program wherein i will need to do a stupendous number of numerical calculations. But since I am developing the front end of the program in Qt Creator, I have as yet been dealing with MinGW.
As such, is there any way to integrate or use the Intel C++ Compiler with QT Creator?
Currently using IC++ 11.0 and QtCreator 1.2.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想是的,但您需要重建/重新配置 Qt Creator,如 在 Windows 上部署应用程序中所述 部分。查看
mkspecs
目录,我看到“win32-icc”,这可能就是您所需要的。编辑:澄清一下,您可能需要整个“SDK”而不仅仅是创建者,然后您需要在 SDK 文件的
qt/
目录中重新配置 Qt树使用加上您可能需要的任何其他选项。构建它也需要一些时间,并且由于
icc
不知道它的编译速度,您可能需要花几个小时到一天的时间。I think so but you need to rebuild / reconfigure Qt Creator as documented in the Deploying an Application on Windows section. And looking into the
mkspecs
directory, I see 'win32-icc' which is probably what you need.Edit: To clarify, you may need the whole 'SDK' rather than just the creator, and you need to then re-configure Qt within
qt/
directoty of the SDK file tree usingplus whatever other options you may need. It also takes a little while to build this, and as
icc
isn't know for its compilation speed you may want to give this a couple of hours to a day.如果您担心某些代码的编译器性能,但想要使用未与所需编译器集成的开发工具,那么使用 Intel 编译器生成由 Qt 程序调用的 DLL 不是更明智的答案?
与所有性能问题一样:您是否对代码进行了基准测试以确保编译器优化实际上是极限?您是否研究过其他选项,例如硬件升级或一些有针对性的汇编代码?通过更换工具来解决无法衡量的性能问题通常只会导致工作浪费。
If you're concerned about compiler performance for some of your code but want to use a development tool that doesn't integrate with your desired compiler, isn't the saner answer to use the Intel compiler to generate a DLL called by your Qt program?
And as with all performance question: have you benchmarked your code to be sure that the compiler optimization is actually the limit? Have you investigated other options, like a hardware upgrade or some targetted assembly code? Whacking at an unmeasured performance problem by changing tools usually just leads to wasted work.