- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
This is my first post.
When I specify "Intel c++ Compiler 2024 (2024.1.0.2)" in a C++ project created with Visual Studio 2022 Pro and include "math.h", the following IntelliSense error is recorded.
- Error Code: E1389
Redeclaration cannot add dllexport/dllimport to "ldexpf" (declared at line 714, file name "C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_math.h")
But the build (compile + link) is successful.
(The attached Dl1.zip is a project file that reproduces E1389.)
Is this an IntelliSense error that always occurs when using Intel c++ Compiler in Visual Studio, or is there something wrong with the way I create a project that uses Intel c++ Compiler?
The attached Dl1.zip is a project file that reproduces E1389.
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can check the preprocess file and you can find that there are two ldexpf functions, one come from MS header file corecrt_math.h, and another from the Intel compiler header file:C:\\PROGRA~2\\Intel\\oneAPI\\compiler\\latest\\bin\\compiler\\..\\..\\opt\\compiler\\include\\math.h. So there may be such an IntelliSense error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for following .
It is true that the "corecrt_math.h" in the MS header causes an E1389 error to be recorded in Intellisense.
In my environment, when you select Intel c++ compiler 2024 in the project settings in Visual Studio, the following include path is automatically set.
[Include Path Search Order]
C:\Program Files (x86)\Intel\oneAPI\tbb\2021.12\include;
C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\include;
C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\opt\compiler\include;
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\include;
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\atlmfc\include;
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt;
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;
So #include <math.h> in test.cpp finds "C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\opt\compiler\include\math.h" before the MS header.
But test.cpp also does not reference "corecrt_ math.h" or "math.h" in the MS header, but the intellisense is affected by the MS header and records E1389.
Do you know if you have to manually adjust the order of the include paths after selecting Intel c++ compiler 2024 in Visual Studio?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Escalated to our engineering team for further investigation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think this IntelliSense error will not affect the operation of your program, right?
We will fix this issue in future versions and this IntelliSense error will disappear.
If you want to get rid of this IntelliSense error now , there is a method, you can modify the file C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\opt\compiler\include\math.h,
Change the following code,
#if !defined(__INTEL_LLVM_COMPILER) || ((defined(__AVX512F__) || (__AVX256P_SUPPORTED__)) && defined(__INTEL_LLVM_COMPILER))
#define ldexpf __MS_ldexpf
#endif
to
#define ldexpf __MS_ldexpf
Please let me know if this method works for you.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Indeed, even if there is an "E1389" error in IntelliSense, I think it will not have any impact because you can still compile and run the program.
I changed "C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\opt\compiler\include\math.h" using the code you taught me.
// #if !defined(__INTEL_LLVM_COMPILER) || ((defined(__AVX512F__) || (__AVX256P_SUPPORTED__)) && defined(__INTEL_LLVM_COMPILER))
// #define ldexpf __MS_ldexpf
// #endif
#define ldexpf __MS_ldexpf
After the change, the "E1389" error is no recorded in IntelliSense.
Thank you.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page