{"id":6014,"date":"2016-04-06T08:53:33","date_gmt":"2016-04-06T07:53:33","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=6014"},"modified":"2016-04-06T08:53:33","modified_gmt":"2016-04-06T07:53:33","slug":"using-the-intel-c-compiler-with-visual-studio-community-edition-2015","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=6014","title":{"rendered":"Using the Intel C++ compiler with Visual Studio Community Edition 2015"},"content":{"rendered":"<p>The <a href=\"http:\/\/www.sheffield.ac.uk\/\">University of Sheffield <\/a>recently purchased licenses for the Windows version of the <a href=\"https:\/\/software.intel.com\/en-us\/intel-compilers\/\">Intel compiler suite <\/a>and I&#8217;m involved in the release to campus process. As part of this, I wrote some basic\u00a0documentation on how to compile <strong>Hello World<\/strong> using the Intel C++ Compiler within Visual Studio Community Edition 2015. Since this may be useful to people outside of University of Sheffield, I reproduce this part of our documentation here.<\/p>\n<p>These notes were prepared using Intel C++ XE\u00a0 2015 version 15.0.6 and Visual Studio Community Edition 2015 RTM version. Note that there are <a href=\"https:\/\/www.walkingrandomly.com\/?p=6008\">problems with using this version of Intel C++ and later versions of Visual Studio Community Edition<\/a>.<\/p>\n<p>Click on any of the images to see them full size.<\/p>\n<ul>\n<li>Launch Visual Studio and click on <strong>File-&gt;New Project<\/strong><\/li>\n<li>Choose <strong>Visual C++<\/strong> -&gt; <strong>Win32 Console Application <\/strong>and give your project a name.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2016\/04\/cpp_project.png\" rel=\"attachment wp-att-6019\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6019\" title=\"Click to see full size\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2016\/04\/cpp_project-300x208.png\" alt=\"cpp_project\" width=\"300\" height=\"208\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/cpp_project-300x208.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/cpp_project-768x533.png 768w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/cpp_project-1024x710.png 1024w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/cpp_project.png 1413w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<ul>\n<li>In the Win32 Application wizard, untick <strong>Precompiled header and Security Development Lifecycle (SDL) checks<\/strong> and click Finish.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2016\/04\/setup_cpp.png\" rel=\"attachment wp-att-6022\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6022\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2016\/04\/setup_cpp-300x240.png\" alt=\"setup_cpp\" width=\"300\" height=\"240\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/setup_cpp-300x240.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/setup_cpp-768x613.png 768w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/setup_cpp.png 999w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<ul>\n<li>A skeleton main() function will appear. Modify the code so that it reads<\/li>\n<\/ul>\n<pre>#include \r\n\r\nint main()\r\n{\r\n    std::cout &lt;&lt; \"Hello World\";\r\n    return 0;\r\n}\r\n<\/pre>\n<ul>\n<li>Click on <strong>Project<\/strong>-&gt;<strong>HelloWorld Properties<\/strong> and under the <strong>C++<\/strong> -&gt; <strong>General<\/strong> section, ensure that <strong>Suppress Startup Banner<\/strong> is set to<strong> No <\/strong>and click OK. This will ensure that when you compile, you&#8217;ll be able to see that it&#8217;s the Intel Compiler doing the work rather than Visual Studio C++.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2016\/04\/startupbanner.png\" rel=\"attachment wp-att-6023\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6023\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2016\/04\/startupbanner-300x215.png\" alt=\"startupbanner\" width=\"300\" height=\"215\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/startupbanner-300x215.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/startupbanner-768x550.png 768w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/startupbanner-1024x734.png 1024w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2016\/04\/startupbanner.png 1253w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<ul>\n<li>Click on <strong>Project<\/strong>-&gt;<strong>Intel Compiler<\/strong>-&gt;<strong>Use Intel C++<\/strong><\/li>\n<li>Build and run the code by pressing CTRL F5. You should see something like the following<\/li>\n<\/ul>\n<pre>&gt;------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------\r\n1&gt;  icl \/Qvc14 \"\/Qlocation,link,C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\" \/ZI \/W3 \/Od \/Qftz- -D __INTEL_COMPILER=1500 -D WIN32 -D _DEBUG -D _CONSOLE -D _UNICODE -D UNICODE \/EHsc \/RTC1 \/MDd \/GS \/Zc:wchar_t \/Zc:forScope \/FoDebug\\ \/FdDebug\\vc140.pdb \/Gd \/TP HelloWorld.cpp stdafx.cpp\r\n1&gt;\r\n1&gt;  Intel(R) C++ Compiler XE for applications running on IA-32, Version 15.0.6.285 Build 20151119\r\n1&gt;  Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.\r\n<\/pre>\n<p>Once the compilation has completed, a console window should pop up showing the Hello World output.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The University of Sheffield recently purchased licenses for the Windows version of the Intel compiler suite and I&#8217;m involved in the release to campus process. As part of this, I wrote some basic\u00a0documentation on how to compile Hello World using the Intel C++ Compiler within Visual Studio Community Edition 2015. Since this may be useful [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[65,7,79,66],"tags":[],"class_list":["post-6014","post","type-post","status-publish","format-standard","hentry","category-cc","category-programming","category-university-of-sheffield","category-windows"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1z0","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6014"}],"version-history":[{"count":6,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6014\/revisions"}],"predecessor-version":[{"id":6026,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6014\/revisions\/6026"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}