系统环境:Ubuntu14.04
集成开发环境:QT
1、用QT建一个纯C++的工程
2、将sar-0.6.tar.gz解压到指定目录,此出解压到了/home/lu/QtDemo目录下
3、配置*.pro文件。注:program_options库,必须编译成静态库或动态库,并在构建时指定链接选项才能使用。
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
INCLUDEPATH +=/usr/local/include
#HEADERS +=/home/lu/QtDemo/sar-0.6/s1a/include/s1a.hh
INCLUDEPATH +=/home/lu/QtDemo/sar-0.6/libsar/include
INCLUDEPATH +=/home/lu/QtDemo/sar-0.6/s1a/include
INCLUDEPATH +=/home/lu/QtDemo/sar-0.6/tinyxpath/include
INCLUDEPATH +=/home/lu/QtDemo/sar-0.6/libsar
SOURCES += /home/lu/QtDemo/sar-0.6/s1a/src/make_slc_s1a.cpp
SOURCES +=/home/lu/QtDemo/sar-0.6/s1a/src/*.cpp
SOURCES +=/home/lu/QtDemo/sar-0.6/libsar/src/*.cpp
SOURCES +=/home/lu/QtDemo/sar-0.6/tinyxpath/src/*.cpp
LIBS+=-L/usr/local/lib -lboost_program_options -lboost_system -lboost_filesystem
LIBS+=-L/usr/lib/x86_64-linux-gnu -ltiff