我正在尝试将 liblas 库链接到 Qt。我在 .pro 文件中使用以下代码来链接它。
//////////////code to link liblas to Qt/////////////////////////////////
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../OSGeo4W/lib/ -lliblas
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../OSGeo4W/lib/ -lliblas
else:unix: LIBS += -L$$PWD/../../../../OSGeo4W/lib/ -lliblas
INCLUDEPATH += $$PWD/../../../../OSGeo4W/include
DEPENDPATH += $$PWD/../../../../OSGeo4W/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../OSGeo4W/lib/ -llaszip
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../OSGeo4W/lib/ -llaszipd
else:unix: LIBS += -L$$PWD/../../../../OSGeo4W/lib/ -llaszip
INCLUDEPATH += $$PWD/../../../../OSGeo4W/include
DEPENDPATH += $$PWD/../../../../OSGeo4W/include
///////////////////////////////////////////////////////////////
and when i am running the code given below, I am getting undefined reference error
ifstream stream;
stream.open("lidar_sample.las", std::ios::in | std::ios::binary);
ReaderFactory f;
Reader reader = f.CreateWithStream(stream);
error: undefined reference to `liblas::ReaderFactory::CreateWithStream(std::istream&)'