<?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 invalid preprocessor command 'include_next' in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/invalid-preprocessor-command-include-next/m-p/1641863#M4183</link>
    <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Hopefully this is the right place to seek help. I recently Installed oneAPI 2025.0.0 and am getting this error on a build that contains several C/C++&amp;nbsp; and Fortran projects in Visual Studio 2022:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;error C1021: invalid preprocessor command 'include_next'&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Visual Studio dumps me in float.h at "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\opt\compiler\include\float.h" at the very bottom at line 450:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cameron_0-1731010267618.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/60169iBBC6E5791459C12C/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="Cameron_0-1731010267618.png" alt="Cameron_0-1731010267618.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The files in question are in a C based project that is set to use MSVC, not Intel C/C++ compiler. Have I missed something obvious?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;edit:&amp;nbsp;When I do a file comparison of float.h from 2024.2/opt/compiler/include, the only difference I see is the #else clause for #include_next. I don't want to say this is a bug since I am not sure on the intention of this change.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2024 20:19:19 GMT</pubDate>
    <dc:creator>Cameron</dc:creator>
    <dc:date>2024-11-07T20:19:19Z</dc:date>
    <item>
      <title>invalid preprocessor command 'include_next'</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/invalid-preprocessor-command-include-next/m-p/1641863#M4183</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Hopefully this is the right place to seek help. I recently Installed oneAPI 2025.0.0 and am getting this error on a build that contains several C/C++&amp;nbsp; and Fortran projects in Visual Studio 2022:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;error C1021: invalid preprocessor command 'include_next'&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Visual Studio dumps me in float.h at "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\opt\compiler\include\float.h" at the very bottom at line 450:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cameron_0-1731010267618.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/60169iBBC6E5791459C12C/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="Cameron_0-1731010267618.png" alt="Cameron_0-1731010267618.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The files in question are in a C based project that is set to use MSVC, not Intel C/C++ compiler. Have I missed something obvious?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;edit:&amp;nbsp;When I do a file comparison of float.h from 2024.2/opt/compiler/include, the only difference I see is the #else clause for #include_next. I don't want to say this is a bug since I am not sure on the intention of this change.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 20:19:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/invalid-preprocessor-command-include-next/m-p/1641863#M4183</guid>
      <dc:creator>Cameron</dc:creator>
      <dc:date>2024-11-07T20:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: invalid preprocessor command 'include_next'</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/invalid-preprocessor-command-include-next/m-p/1641874#M4185</link>
      <description>&lt;P&gt;&amp;nbsp;I've escalated your question to our internal team for further investigation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 21:30:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/invalid-preprocessor-command-include-next/m-p/1641874#M4185</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2024-11-07T21:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: invalid preprocessor command 'include_next'</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/invalid-preprocessor-command-include-next/m-p/1644507#M4202</link>
      <description>&lt;P&gt;Posting the fix in case someone searches for this exact error since this post seems to come up now. I hate when I find the exact forum post that says "I fixed it" without saying how!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our build environment, we use a Directory.Build.targets file that modifies what Visual Studio uses for the IncludePath and LibraryPath variables. At one point we needed to have a programmatic way to switch the version of the Fortran compiler used to build the product. Visual Studio will recursively try to find this file (similar with .props) on launch and then load the instructions within.&lt;/P&gt;&lt;P&gt;My .targets file specifically set IncludePath to insert oneAPI paths before the content of what already existed in IncludePath. This causes Visual Studio to load float.h from the Intel include files, not from the Windows SDK if using Visual C++ / MSVC. The simple fix for me was to just append oneAPI paths after IncludePath like so:&lt;/P&gt;&lt;PRE&gt;$(IncludePath);C:\Program Files (x86)\Intel\oneAPI\compiler\2025.0\opt\compiler\include; ... &amp;lt;other paths&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is a better way to set these paths, I would appreciate the feedback. Our automated builds run devenv from headless instances (like cmd.exe). Most of this behavior stems directly from our need to use varying versions of the older IVF compiler for different products we supported.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 14:27:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/invalid-preprocessor-command-include-next/m-p/1644507#M4202</guid>
      <dc:creator>Cameron</dc:creator>
      <dc:date>2024-11-20T14:27:27Z</dc:date>
    </item>
  </channel>
</rss>

