So basically I have some really simple code that includes <BigIntegerLibrary.hh>
which resides in /Users/wen/Projects/include/bigint
. I was compiling with this:
g++ main.cpp -o Main -I/Users/wen/Projects/include/bigint
but it reported a fatal error that it could not find the file. Am I doing it right? Thanks!
main.cpp:4:10: fatal error: 'BigIntegerLibrary.hh' file not found
Try
#include "BigIntegerLibrary.hh"
If you specify the #included file with angle brackets (#include <includeFile.h>
) the compiler will try to find it in a predefined location whereas if you use #include "includeFile"
the compiler first tries the paths you specified with the -I
compiler option.
The -I
compiler option cannot be used to specify where the <...>
files are.
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