When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
6 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
-I/include adds the folder /include, child of the root directory.
Replace it by a space:
g++ -o main -I include main.cpp add.cpp -std=c++17
^
It should be just -Iinclude
Yes with or without a space, both are valid.
Oh they actually are, gcc only lists Idir but on https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html they list -I dir
Directory Options (Using the GNU Compiler Collection (GCC))
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity