PIC error compiling ACE with Clang

♀尐吖头ヾ 提交于 2020-01-13 06:45:08

问题


I'm tring to compile some ACE lib within my project with PCH support and including only sources that i need

I'm on ubuntu 16.04 and i need to use clang

but i've this error:

error: PIC level differs in PCH file vs. current file

I've prepared a MVCE, you need clang installed ofc, then just run following commands:

git clone https://github.com/Yehonal/ace-clang-test.git
cd ace-clang-test
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CC_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ ..
make -j 4

How can i solve it?

EDIT: in repository linked above i've only created CMakeLists.txt and PCHSupport.cmake files, others are original sources from ACE lib

来源:https://stackoverflow.com/questions/39014042/pic-error-compiling-ace-with-clang

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!