How to Build a Module

Bernard 1 Reputation point
2021-09-14T02:56:20.403+00:00

I wish to build a C++ module I wish to build it separately from any other project All tutorials I've found build a module along w/ a Hello World executable That makes no sense Modules are intended to be consumed by any number of projects So it seems they should be built separately Also once the module is built where does it reside How do I find it How does one import it to a project I assume one can not merely write import MyModule; as how can the compiler find it Thank You Kindly

Developer technologies | C++
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. WayneAKing 4,931 Reputation points
    2021-09-14T04:11:44.04+00:00

    Have you read these docs?

    Overview of modules in C++
    https://learn.microsoft.com/en-us/cpp/cpp/modules-cpp?view=msvc-160

    A Tour of C++ Modules in Visual Studio
    https://devblogs.microsoft.com/cppblog/a-tour-of-cpp-modules-in-visual-studio/

    • Wayne
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.