icmodmap(1) initializes C++ projects using modules icmodmap(1) (NAME) icmodmap - ++C (SYNOPSIS) icmodmap [] start-directory (DESCRIPTION) g++ ++C (.. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524). ( ) . . (import) . . icmodmap . Icmodmap ( ) module.cc . First Second ( first second) second/module.cc First first/module.cc second/module.cc . icmodmap . module.cc . Icmodmap : o CLASSES ( C++) . ( ) . (partition) ( ) ( ) o ( main.cc) main . o module.cc ( module.cc ) o ( ). . Icmodmap(1) . module.cc ( ) ( ) : o : o import / . (OPTIONS) Icmodmap : o --colors (-c) -fdiagnostics-color=never . o --dependencies (-d) . . Icmodmap : Square:l DepSquare: Square :l Square . : DepSquare Square . . : Square:e Mod1: Square:e Mod2: Square:e Mod1 Mod3: Square:e Mod1 Mod2 Square :e . Square ( ) Mod3 Mod1 Mod2 . Square.gcm gcm.cache ( ) o --help (-h) 0 o --module=file (-m) module.cc . . interface.cc --module interface.cc . o --subdir (-s) tmp/o ( tmp/o/1module.o tmp/o/2module.o ). --subdir ( ) o --version (-v) icmodmap . o --verbose (-V) . (EXAMPLES) Square square module.cc : export module Square; export { double square(double value); class Square { double d_amount; public: Square(double amount = 0); // initialize void amount(double value); // change d_amount double amount() const; // return d_amount double lastSquared() const; // returns g_squared double square() const; // returns sqr(d_amount) }; } double g_squared; main Square . iostream . icmodmap main.cc . main.cc : import Square; import ; int main(int argc, char **argv) { std::cout << "the square of " << argc << " is " << square(argc) << '\n'; Square obj{12}; std::cout << "the square of 12 is " << obj.square() << "\n" "the last computed square is " << obj.lastSquared() << '\n'; } icmodmap -d . Square : Square:l icmodmap -V . square/module.cc : Module: Square square: /bin/g++ --std=c++26 -fdiagnostics-color=never -c -fmodules-ts -Wall -o ../tmp/o/1module.o module.cc gcm.cache Square.gcm usr -> /usr . square/gcm.cache -> ../gcm.cache : gcm.cache . (SEE ALSO) icmake(1). (BUGS) . (COPYRIGHT) (GPL) . (AUTHORS) Frank B. Brokken (f.b.brokken@rug.nl). icmake.13.00.03 1992-2025 icmodmap(1)