Last active
March 14, 2025 17:32
-
-
Save PramithaMJ/f025eee40418e2e41001f4b5256d7dc5 to your computer and use it in GitHub Desktop.
If the compiler can't find the omp.h header file in MacOS
This file contains hidden or 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
| find /opt/homebrew -name "omp.h" | |
| brew list libomp | |
| clang -Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include -L/opt/homebrew/opt/libomp/lib -lomp omp_hello.c -o hello | |
| ./hello | |
| or | |
| /opt/homebrew/bin/gcc-14 -fopenmp omp_hello.c -o hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment