Section 12.15 Final Program Using Modules
Here is the final program using the DateFunctions module. It requires the DateFunctions module to build. It can be compiled with the following command:
$ g++ -std=c++20 -fmodules-ts main.cpp DateFunctions.cxx -o program.exe
main.cpp
for use with moduleAnd the final unit test program. It can be compiled with the following command:
$ g++ -std=c++20 -fmodules-ts dateTests.cpp DateFunctions.cxx -o test-program.exe
dateTests.cpp
for use with moduleAdd the code for the module itself. It can not be linked into a full program, but can be compiled. It would be compiled with something like:
g++ -c -std=c++20 -fmodules-ts DateFunctions.cxx -o DateFunctions.o
DateFunctions.cxx
You have attempted of activities on this page.