mod1.ccm
Код: Выделить всё
module;
#include // producing the linking error
export module mod1;
Код: Выделить всё
module;
#include
export module mod2;
import module mod1;
export std::string s = "mystring";
Код: Выделить всё
#include
import mod2;
int main(){
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78235973/linking-errors-with-includes-in-c-nested-modules[/url]
Мобильная версия