using g++ to compile cpp file in macOS.
macOS v10.15.4
Apple clang version 11.0.3 (clang-1103.0.32.62)
hello.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "hello word" << endl;
return 0;
}
in terminal I run:
g++ hello.cpp

CPLUS_INCLUDE_PATH environment variable has an incorrect value.
Simple fix:
export CPLUS_INCLUDE_PATH=":/usr/local/include"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With