Try first for more information, use the gcc option(s) to print out the search path being used for each item searched for.
Once we know how it is going wrong, it will be easier to fix.
The man(ual) command is your friend and recognized by web-search applications if you don't happen to have the documentation installed on your system.
man gcc
that should do the job for you.