Hi All,
I just upgraded to a new PC that I need to use use ubuntu 17 on ( graphics drivers )
I've went to compile some code that's always worked, it links against an external .o file ( not my file ), however I now get a liking error and am told to use -fPIC. However I use fPIC in my makefile
Code:
CC =$(TRGT)g++ -fPIC -std=c++0x
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
the error is
Code:
iodriver_x64.o: relocation R_X86_64_32S against `.rodata' cannot be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Is there some error with fPIC now? "gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)" Does anyone know a way I can fix this? Thanks