Created
May 26, 2022 02:55
-
-
Save kotatsuyaki/fe37910f94536452cab5472c60708b8c to your computer and use it in GitHub Desktop.
Using C++ modules with GCC 12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import <iostream>; | |
int main() { | |
std::cout << "Hello modules\n"; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.POSIX: | |
CXX = g++ | |
CXXFLAGS = -std=c++20 -fmodules-ts | |
main: gcm.cache main.cpp | |
$(CXX) $(CXXFLAGS) main.cpp -o main | |
gcm.cache: | |
$(CXX) $(CXXFLAGS) -c -x c++-system-header iostream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment