title: Compilation fails with "relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object"
body: <p>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</p>
  
  <p>Here's the full error</p>
  
  <pre><code># make
  gcc -c -O3 -w -DLINUX -I../SDK/amx/ ../SDK/amx/*.c
  g++ -c -O3 -w -DLINUX -I../SDK/amx/ ../SDK/*.cpp
  g++ -c -O3 -w -DLINUX -I../SDK/amx/ *.cpp
  g++ -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 -fPIC
  TCP-LINUX_V1.o: could not read symbols: Bad value
  collect2: ld returned 1 exit status
  make: *** [all] Error 1
  </code></pre>
  
  <p>Here's my makefile:</p>
  
  <pre><code>GPP=g++
  GCC=gcc
  OUTFILE="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
  </code></pre>
  
  <p>Anyone know what's wrong?</p>