0
正如問題所述,我需要應用這些編譯器/鏈接器設置。我正在使用Code :: Blocks 10.05。我瀏覽了所有的構建設置屏幕。我無法找到應用這些設置的位置。我得到的輸出如下:在Code :: Blocks中應用--enable-shared或-fPIC
-------------- 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
太棒了!希望我有這個答案,然後我決定廢除codeblocks ....但謝謝 – nterry 2012-10-18 00:19:21