How to compile C++ modules?

DangDKhanh-2637 941 Reputation points

i'm using pre-compile header file for the my project.
my problem is i am learning c ++ modules and after creating file.ixx i get the message like image.


How I can fix this? Is disabling precompile the right solution?


Thanks you!

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,599 questions
0 comments No comments
{count} votes

Accepted answer
  1. Barrnet Zhou-MSFT 171 Reputation points

    When adding a C++ file, it inherits the PCH settings of the project.

    There are two solutions:

    1. Add at the start of the file. #pragma once
    2. Setting your project to not use precompiled headers
    0 comments No comments

0 additional answers

Sort by: Most helpful