Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
613 Discussions

Moving existing code with modules to Intel c++

Vivia
Beginner
1,488 Views
Hello,
I have installed the oneapi base toolkit (version 2024.0). I have an existing c++ project built with visual studio 2022 that uses the c++20 modules feature.
My project compiles and runs with no errors when I use visual studio 2022 (v143) as my platform toolset, and the language standard set to /std:c++latest.

I'm trying to use the Intel compiler for my project. In the project properties, I selected 'Intel oneapi dpc++ compiler 2024' as my platform toolset. However, my build fails with "module (my module name) not found".

Are there any additional settings I must set to enable module support? Any help is appreciated.
Labels (1)
0 Kudos
6 Replies
SeshaP_Intel
Moderator
1,445 Views

Hi,


Thank you for posting in Intel Communities.


Could you please provide the following details you were using so that we can reproduce the issue on our end?

1. Visual Studio project solution

2. Visual Studio version (including sub-version)


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
Vivia
Beginner
1,383 Views

Hello, 

Thank you for your reply. Unfortunately, I am unable to share my project, but I have been able to build a minimal example which exhibits the same symptoms. Please find it attached below. 

 

Using Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.8.3

 

If I compile the project as-is, I get "hello world". If I click on "project properties", "intel compiler", "Use Intel OneAPI DPC++/C++ Compiler", the project no longer compiles.

0 Kudos
SeshaP_Intel
Moderator
1,322 Views

Hi,


Thanks for providing the reproducer code. We were able to reproduce your issue. 

We are working on it internally. We will get back to you soon.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
Larry9
Beginner
982 Views

@SeshaP_Intel 

Hi there. Is there any update on this issue? It's been almost 2 months since your post above. Same issue persists in the latest version of Visual Studio (17.8.5) at this writing (module not found), but same code works under GCC, MSVC and Clang. There's no information from Intel I can find anywhere on C++ modules except for this. It shows that feature P1103R3 is partially supported in the latest version yet there are no instructions I can find about it anywhere (usage instructions in particular, such as Visual Studio settings if any in that particular environment, command line switches, etc.). 

 

Thanks ....

0 Kudos
Mahan
Moderator
772 Views

Hi,

First of all, I am sorry for the late reply.

 

The C++20 module support is partial with ICX.

One may use clang instead and it has support for C++ 20 modules. The following lists how one can enable them for CLANG  https://clang.llvm.org/docs/StandardCPlusPlusModules.html

Similar implementation can be used for ICX to enable the module support.

0 Kudos
Vivia
Beginner
551 Views

Hello,

Would you able to confirm whether module support is planned for the next OneAPI release, or if not, for what release it is slanted for? This issue is blocking me from porting some of our applications to ICX. Since my reason for porting them is to survey potential performance gains from Intel-specific optimizations included in ICX, CLANG is not a viable replacement for my use case.  

Thanks,

Vivia

0 Kudos
Reply