<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cannot use boost/thread with DPC++ in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1398558#M2337</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created the DPC++ sample console vector add application. Creating/compiling and executing works well on my system:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Windows 11 - all updates&lt;/P&gt;
&lt;P&gt;VS 2022 - latest release (17.2.5)&lt;/P&gt;
&lt;P&gt;DPC++ from oneAPI_2022.1.0.256&lt;/P&gt;
&lt;P&gt;This is the project template I use. I have not changed anything else than the two lines below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daniel_D_0-1657182923186.png" style="width: 1192px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/31344i17A47436AABC3FB7/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Daniel_D_0-1657182923186.png" alt="Daniel_D_0-1657182923186.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I want to use a boost thread in this application. For that I add these 2 lines to the top of the&amp;nbsp;DPCPPConsoleApplication1.cpp file like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//==============================================================&lt;BR /&gt;// Copyright © Intel Corporation&lt;BR /&gt;//&lt;BR /&gt;// SPDX-License-Identifier: MIT&lt;BR /&gt;// =============================================================&lt;BR /&gt;&lt;STRONG&gt;#define _WIN32_WINNT _WIN32_WINNT_WIN8&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#include &amp;lt;boost/thread.hpp&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;&lt;BR /&gt;#include &amp;lt;vector&amp;gt;&lt;BR /&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#if FPGA || FPGA_EMULATOR&lt;BR /&gt;#include &amp;lt;ext/intel/fpga_extensions.hpp&amp;gt;&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No other changes made. Now I cannot compile this application anymore because I get an error and several warning:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&amp;gt;T:\\Development\\3rdParty\\boost_1_79_0\\include\boost/config/requires_threads.hpp(82,4): : error : "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"&lt;BR /&gt;1&amp;gt;# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The /MDd flag is already set from thew sample app. The complete commandline looks like this:&lt;BR /&gt;&lt;BR /&gt;/Od //I"T:\Development\3rdParty\boost_1_79_0\include" /Zi /D "_DEBUG" /WX- /MDd /std:c++17 /EHsc /W3 /nologo /Fo"x64\Debug\" &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and:&lt;/P&gt;
&lt;P&gt;/Zc:__cplusplus&lt;/P&gt;
&lt;P&gt;as additional option&lt;BR /&gt;&lt;BR /&gt;Any idea how I can use boost together with DPC++?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 08:36:25 GMT</pubDate>
    <dc:creator>Daniel_D</dc:creator>
    <dc:date>2022-07-07T08:36:25Z</dc:date>
    <item>
      <title>Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1398558#M2337</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created the DPC++ sample console vector add application. Creating/compiling and executing works well on my system:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Windows 11 - all updates&lt;/P&gt;
&lt;P&gt;VS 2022 - latest release (17.2.5)&lt;/P&gt;
&lt;P&gt;DPC++ from oneAPI_2022.1.0.256&lt;/P&gt;
&lt;P&gt;This is the project template I use. I have not changed anything else than the two lines below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daniel_D_0-1657182923186.png" style="width: 1192px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/31344i17A47436AABC3FB7/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Daniel_D_0-1657182923186.png" alt="Daniel_D_0-1657182923186.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I want to use a boost thread in this application. For that I add these 2 lines to the top of the&amp;nbsp;DPCPPConsoleApplication1.cpp file like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//==============================================================&lt;BR /&gt;// Copyright © Intel Corporation&lt;BR /&gt;//&lt;BR /&gt;// SPDX-License-Identifier: MIT&lt;BR /&gt;// =============================================================&lt;BR /&gt;&lt;STRONG&gt;#define _WIN32_WINNT _WIN32_WINNT_WIN8&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#include &amp;lt;boost/thread.hpp&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;&lt;BR /&gt;#include &amp;lt;vector&amp;gt;&lt;BR /&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#if FPGA || FPGA_EMULATOR&lt;BR /&gt;#include &amp;lt;ext/intel/fpga_extensions.hpp&amp;gt;&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No other changes made. Now I cannot compile this application anymore because I get an error and several warning:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&amp;gt;T:\\Development\\3rdParty\\boost_1_79_0\\include\boost/config/requires_threads.hpp(82,4): : error : "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"&lt;BR /&gt;1&amp;gt;# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The /MDd flag is already set from thew sample app. The complete commandline looks like this:&lt;BR /&gt;&lt;BR /&gt;/Od //I"T:\Development\3rdParty\boost_1_79_0\include" /Zi /D "_DEBUG" /WX- /MDd /std:c++17 /EHsc /W3 /nologo /Fo"x64\Debug\" &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and:&lt;/P&gt;
&lt;P&gt;/Zc:__cplusplus&lt;/P&gt;
&lt;P&gt;as additional option&lt;BR /&gt;&lt;BR /&gt;Any idea how I can use boost together with DPC++?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 08:36:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1398558#M2337</guid>
      <dc:creator>Daniel_D</dc:creator>
      <dc:date>2022-07-07T08:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1398958#M2343</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;Since you want to use boost thread along with dpcpp sycl code we would like to understand the use case behind it so that it would help us to address your issue better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vidya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 14:34:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1398958#M2343</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-07-08T14:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1399089#M2344</link>
      <description>&lt;P&gt;Hi Vidya,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for your fast reply. In this case I have to call a function in a 3rd party library. This function can take up to some minutes to return. So I call it in a thread. If the user want now to exit my application I need to cancel the execution of this thread. std::thread does not offer this option. So I have to use boost::thread. I can cancel the execution and I can terminate my application. This is one sample why I use boost - but there are much more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2022 03:48:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1399089#M2344</guid>
      <dc:creator>Daniel_D</dc:creator>
      <dc:date>2022-07-09T03:48:07Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1401149#M2370</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Apologies for the delay and thanks for your patience.&lt;/P&gt;&lt;P&gt;The issue raised by you is reproducible from our end as well.&lt;/P&gt;&lt;P&gt;We are working on it. we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Jul 2022 10:18:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1401149#M2370</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-07-18T10:18:56Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1417660#M2556</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Please refer to &lt;A href="https://www.intel.com/content/www/us/en/developer/articles/technical/building-boost-with-oneapi.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/articles/technical/building-boost-with-oneapi.html&lt;/A&gt; and let me know if you have further questions.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subarna&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Sep 2022 13:57:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1417660#M2556</guid>
      <dc:creator>Subarnarek_G_Intel</dc:creator>
      <dc:date>2022-09-27T13:57:39Z</dc:date>
    </item>
    <item>
      <title>Betreff: Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1417835#M2557</link>
      <description>&lt;P&gt;Hi Subarna,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for your information. As you might have overread, the problem is NOT to build boost with DPC++. The problem I have is that I cannot USE boost in a DPC++ console application. If you follow this guide, you may see the problem I have:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new project:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daniel_D_0-1664333725367.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/33721iA2AE0F81020A1177/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Daniel_D_0-1664333725367.png" alt="Daniel_D_0-1664333725367.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and make this modification to add boost support:&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;Now I want to use a boost thread in this application. For that I add these 2 lines to the top of the&amp;nbsp;DPCPPConsoleApplication1.cpp file like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;//==============================================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;// Copyright © Intel Corporation&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;//&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;// SPDX-License-Identifier: MIT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;// =============================================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#define _WIN32_WINNT _WIN32_WINNT_WIN8&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#include &amp;lt;boost/thread.hpp&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#include &amp;lt;vector&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#include &amp;lt;iostream&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#if FPGA || FPGA_EMULATOR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#include &amp;lt;ext/intel/fpga_extensions.hpp&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sub_section_element_selectors"&gt;#endif&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;You will see that it is now no longer possible to compile the project. So, using boost in a DPC++ application is not possible and the problem I have. Not building boost with DPC.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 02:58:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1417835#M2557</guid>
      <dc:creator>Daniel_D</dc:creator>
      <dc:date>2022-09-28T02:58:21Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1422012#M2592</link>
      <description>&lt;P&gt;In dpcpp compiler, the macro "BOOST_HAS_THREADS" isn't recognized. So it generates that error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;There is a workaround, which is defining this macro by yourself before including the boost/thread.hpp file, as follows,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;#define BOOST_HAS_THREADS&lt;/P&gt;&lt;P&gt;#include &amp;lt;boost/thread.hpp&amp;gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Oct 2022 14:05:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1422012#M2592</guid>
      <dc:creator>Subarnarek_G_Intel</dc:creator>
      <dc:date>2022-10-14T14:05:38Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot use boost/thread with DPC++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1423557#M2601</link>
      <description>&lt;P&gt;&lt;EM style="font-family: Calibri, sans-serif; font-size: 11pt;"&gt;This issue has been resolved and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/EM&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Oct 2022 05:27:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Cannot-use-boost-thread-with-DPC/m-p/1423557#M2601</guid>
      <dc:creator>Subarnarek_G_Intel</dc:creator>
      <dc:date>2022-10-20T05:27:26Z</dc:date>
    </item>
  </channel>
</rss>

