-1

I am trying to link liblas library to Qt.I am using following code in .pro file to link it.

    //////////////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&)'
Neeraj Shukla
  • 29
  • 2
  • 10

1 Answers1

0

only two possible answers here.

  1. your liblas is not found by the linker
  2. your liblas is not the same version as your headers.
Tomaz Canabrava
  • 2,320
  • 15
  • 20