As the question states, I need to apply either of those compiler/linker settings. I am using Code::Blocks 10.05. I've looked through all the build settings screens. I cannot find where to apply these settings. I am getting the following on output:
-------------- Build: Release in 39dll-4-Linux ---------------
Linking dynamic library: ./39DLL.so
/usr/bin/ld: obj/Release/buffer.o: relocation R_X86_64_32 against `CBuffer::retval' can not be used when making a shared object; recompile with -fPIC
obj/Release/buffer.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings