How to compile C++ modules?

DangDKhanh-2637 946 Reputation points
2021-02-14T21:59:41.913+00:00

Hi,
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.

67866-image.png

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

67909-image.png

Thanks you!

C++
C++
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,637 questions
0 comments No comments
{count} votes

Accepted answer
  1. Barrnet Zhou-MSFT 171 Reputation points
    2021-02-15T08:15:29.93+00:00

    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