?????????????????Linux?μ??Щ??????????????????е?????????????????????????????????Щ??????????????????????

?????????C++???????????C????д???????????????C++????????????????????

extern "C"

{

??include "???????"

}

??????????????д??C??

???????????????????????main.cpp hello.c hello.h???????????main.cpp?????????hello.c?????????????main.cpp??????????hello.h??????????hello.c?????????????mian.cpp?????????д??

extern "C"

{

??include "hello.h"

}

???????????????????????????????????????磺

????:??.text+0 x7??: undefined reference to ...

?????????????Щ??????????????????????????????????????????????????????????????????????

????????????????????????????????????????????/usr/local???£???????????????????????????????????????????????????/etc/ld.so.conf????????/usr/local/lib??????????????

????ldconfig -v

???????????

?????????????????/usr/local/lib?????????????ldconfig -v ????

??????. ???????????????????

????1. PC Linux???

?????磺??ldd /mypath/hello

????2. ARM Linux???

?????磺??arm-linux-readelf -d hello