Я пытаюсь связать библиотеку 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&)'
Здесь только два возможных ответа.
Других решений пока нет …