LD_LIBRARY_PATH doesnt help you during compile time, it might be required during runtime if your ldconfig isnt configured properly.
Gcc doesnt care about this variable during compiling, you have to specify the search paths for the libraries like you have to specify the include paths.