Cannot compile from source with g++ on MAC OS Catalina

Hello,
I'm on Mac OS Catalina 10.15.4, and when I compile from source with this instruction :

g++-9 -c test.cpp -I /Download/project/include -I /usr/local/include -I /Downloads/trimesh2/include/ -I /Downloads/armadillo-6.400.3/include/ -I /usr/X11R6/include -I /Downloads/project/include -o test.o

I get many errors such as :
/usr/local/include/string.h:145:67: error: expected initializer before '__OSX_AVAILABLE_STARTING' 145 | errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);

or :
/usr/local/include/sys/stdio.h:39:56: error: expected initializer before
'__OSX_AVAILABLE_STARTING' 39 | int renameat(int, const char *, int, const char. *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);

I don't know why I'm getting these errors since I installed gcc with homebrew. The code is correct since I used it before upgrading to Mac OS Catalina. I think that problem is related to g++ or commandTools of Mac.

Any help please?
use windows
Is the path -I /Download/... correct? I don't think it would be.
@kbw, thank you for your response.
The path is ok.
These informations may help you ?

'g++-9 --version' command returns this :
g++-9 (Homebrew GCC 9.3.0_1) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and I'm getting other errors like these :
/Users/anass/Documents/projet/non_virtual_asgard/include/core/MeshDataSource.h:326:20: required from here
/usr/local/Cellar/gcc/9.3.0_1/include/c++/9.3.0/ostream:691:5: error: no type named 'type' in 'struct std::enable_if<false, void>'


or


/Users/anass/Documents/projet/non_virtual_asgard/include/core/MeshDataSource.h:337:21: error: no match for 'operator<<' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'const char [3]')
Topic archived. No new replies allowed.