我正在尝试安装GLUI2库。
我遵循ReadMe中的说明,它告诉我转到GLUI的根目录并运行Make。我得到以下错误:
/usr/bin/ld: Glui2/stb_image.o: relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC我尝试在makefile的两个编译行中包括-fPIC,并得到以下错误消息:
/usr/bin/ld: Glui2/g2Button.o: relocation R_X86_64_32S against `_ZTV8g2Button' can not be used when making a shared object; recompile with -fPIC
Glui2/g2Button.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status我真的不知道这些错误告诉我的是什么,也不知道我应该做些什么来解决这些错误。
我正在用它为我用OpenGL制作的游戏建立一个小的用户界面,如果你建议一个不同的库来处理过剩的话,我也会很感激这些建议。
发布于 2015-03-08 14:06:48
0是从Glui2 2/stb_Image.c文件生成的。将文件重命名为Glui2/stb_image.cpp,,并在makefile中更新文件名。
然后运行“使干净”和再次“使”。
它对我有效,它似乎混合c和cpp文件并不是很好的工作在这个项目。
https://stackoverflow.com/questions/26623250
复制相似问题