[1/2] g++ -std=gnu++11 -Wall -g -I/usr/local/include -c test.cpp -o test.o
[2/2] g++ -std=gnu++11 -L/usr/local/lib64 -Wl,-rpath,/usr/local/lib64 -glog -lfolly test.o -o hello
FAILED: g++ -std=gnu++11 -L/usr/local/lib64 -Wl,-rpath,/usr/local/lib64 -glog -lfolly test.o -o hello
/usr/bin/ld: /usr/local/lib64/libfolly.so: undefined reference to symbol '_ZN6google15LogMessageFatalD1Ev'
/usr/bin/ld: note: '_ZN6google15LogMessageFatalD1Ev' is defined in DSO /usr/local/lib64/libglog.so.0 so try adding it to the linker command line
/usr/local/lib64/libglog.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
libglog sits inside /usr/local/lib64 just like libfolly. For some reason it “could not read symbols” on the glog library. Why not? I already tried adding all of these with no change: -ldl -lc -lpthread -lrt
As I don’t really know why they should be necessary, I left them out from the output above.
You have -glog . Should it not be -lglog?