You may need to add the full path to LIBS +=-L/home/yourname/serial/bin -lserial
or
Open your Makefile in an editor
copy so file to /serial/bin
then add -L/home/yourname/serial/bin -lserial to LIBS =
if you do not know what the full path is, go to /serial/bin and type pwd to get the full path.
-L/serial/bin tells where your so is
-lserial means link it.
Normally you put a .so file in a lib, not in bin(for binary executable) since it is a dynamic library
我在linux下写好了串口程序,生成了。so的文件
我在我的工程中pro文件中加了LIBS +=-L/serial/bin -lserial
但是编译时还是报错说没有serial这个库。
各位,网上和书上都是这么做的,但是我这就是不对
希望有你的指点
[ 此帖被steinlee在2009-11-12 10:09重新编辑 ]