От: | plastictown | ||
Дата: | 20.03.20 18:29 | ||
Оценка: |
CXXFLAGS=-std=c++14 -fPIC -Wall -Weffc++ -O3
g++ $(CXXFLAGS) -c file.cpp
boost_path=/usr/lib/x86_64-linux-gnu
LIBS=$(boost_path)/libboost_system.a $(boost_path)/libboost_thread.a # and so on...
g++ $(CXXFLAGS) -o lib.so -shared file.o $(LIBS)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_system.a(error_code.o): relocation R_X86_64_PC32 against symbol `_ZTVN5boost6system14error_categoryE' can not be used when making a shared object; перекомпилируйте с параметром -fPIC
/usr/bin/ld: final link failed: Некорректное значение