Quantcast
Viewing all articles
Browse latest Browse all 22042

Compilation fails with "relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object"

I'm trying to compile this source code from the makefile in a VPS, but its not working. The VPS is a 64 Cent OS

Here's the full error

# makegcc -c -O3 -w -DLINUX -I../SDK/amx/ ../SDK/amx/*.cg++ -c -O3 -w -DLINUX -I../SDK/amx/ ../SDK/*.cppg++ -c -O3 -w -DLINUX -I../SDK/amx/ *.cppg++ -O2 -fshort-wchar -shared -o "TCP_V1.so" *.o/usr/bin/ld: TCP-LINUX_V1.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be     used when making a shared object; recompile with -fPICTCP-LINUX_V1.o: could not read symbols: Bad valuecollect2: ld returned 1 exit statusmake: *** [all] Error 1

Here's my makefile:

GPP=g++GCC=gccOUTFILE="TCP_V1.so"COMPILE_FLAGS=-c -O3 -w -DLINUX -I../SDK/amx/all:    $(GCC) $(COMPILE_FLAGS) ../SDK/amx/*.c    $(GPP) $(COMPILE_FLAGS) ../SDK/*.cpp    $(GPP) $(COMPILE_FLAGS) *.cpp    $(GPP) -O2 -fshort-wchar -shared -o $(OUTFILE) *.o

Anyone know what's wrong?


Viewing all articles
Browse latest Browse all 22042

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>