[Liblas-devel] Linker errors with Windows import library in v1.2.1
Mateusz Loskot
mateusz at loskot.net
Sat Nov 14 11:30:44 EST 2009
James Domingo wrote:
> 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:
> [...]
> Is there something else that's needed to link with the libLAS dll?
James,
If you are up to use C++ API, you are supposed to link against static
library only (liblas.lib).
The import/dll libraries do export only C API.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the Liblas-devel
mailing list