修改已有的pro文件,添加如下几句:
INCLUDEPATH += /home/ubuntu/camera/camera/
LIBS += -L/home/ubuntu/camera/camera -ltest
INCLUDEPATH添加了项目的目录,以便找到头文件,而LIBS添加的是共享库文件,-L添加目录,-l指定共享库名称。
参考网址:http://www.librehat.com/linux-qt-to-create-and-call-a-shared-library-so-file/
http://blog.sina.com.cn/s/blog_54f82cc20101153x.html
http://blog.csdn.net/yizezhong/article/details/12849449