I've created a simple console project in VC++ 2008 (express) with the
code from the libLAS C++ tutorial:

#include <liblas/lasreader.hpp>
#include <fstream>  // std::ifstream
#include <iostream> // std::cout

int main(int argc, char* argv[])
{
  std::ifstream ifs;
  ifs.open(argv[1], std::ios::in | std::ios::binary);
  liblas::LASReader reader(ifs);
  liblas::LASHeader const& header = reader.GetHeader();
  std::cout << "Signature: " << header.GetFileSignature() << '\n';
  std::cout << "Points count: " << header.GetPointRecordsCount() << '\n';
  return 0;
}

The code compiles and links successfully if I specify the static liblas
library as an additional dependency to the linker:

Linker:
 Additional Dependencies: liblas.lib

However, if I change that dependency to the Windows import library
(liblas_i.lib) for the liblas1.dll, the linker reports unresolved symbol
errors:

"public: __thiscall liblas::LASReader::~LASReader(void)"
(??1lasrea...@liblas@@q...@xz)

"public: unsigned long __thiscall
liblas::LASHeader::GetPointRecordsCount(void)const"
(?getpointrecordsco...@lasheader@liblas@@QBEKXZ)

"public: class std::basic_string<char,struct std::char_traits<char>,
class std::allocator<char> > __thiscall
liblas::LASHeader::GetFileSignature(void)const " (?getfilesignat...@lasheader@liblas@@qbe?av?$basic_str...@du?$char_traits@d...@std@@v?$alloca...@d@2@@std@@XZ)
"public: class liblas::LASHeader const & __thiscall
liblas::LASReader::GetHeader(void)const "
(?gethea...@lasreader@liblas@@qbeabvlashea...@2@XZ)

"public: __thiscall liblas::LASReader::LASReader(
class std::basic_istream<char,struct std::char_traits<char> > &)"
(??0lasrea...@liblas@@q...@aav?$basic_istream@du?$char_tra...@d@std@@@std@@@Z)

Is there something else that's needed to link with the libLAS dll?

Jimm
--
James Domingo
Green Code LLC
_______________________________________________
Liblas-devel mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/liblas-devel

Reply via email to