[Liblas-devel] Linker error using compilation tutorial with VC++

Niklas Salomonsson ekholm.niklas at gmail.com
Wed Jun 6 06:51:35 PDT 2012


Hi all,

I am pretty new to this IDE C++ development for larger systems and I'm 
having big problems getting things to work, largely due to linker 
errors. Firstly I will state my setup. I'm using MSVC++ 2008, Boost 
1.47.0, CMake 2.8, and a Windows 7 64 bit system. I built libLAS.sln 
successfully in release mode using the tutorial on the homepage.

My directories are:
C:\liblas (where libLAS.sln is found)
C:\boost\boost_1_47 (where the lib directory is found)
C:\OSGeo4W (where the include directory is found)

In VC++ my search directories are:
Include: C:\OSGeo4W\include; C:\boost\boost_1_47; C:\liblas\include
Library: C:\boost\boost_1_47\lib; C:\liblas\bin\Release; OSGeo4W\lib; 
OSGeo4W\bin

In the linker I have included liblas.lib. I have also tried copying the 
liblas.dll (both from liblas\bin\Release and OsGeo4W\bin directories to 
windows\system32. Whatever I do results in the same error assuming I use 
the sample code from the liblas homepage, which follows:

error LNK2001: unresolved external symbol "public: double __thiscall 
liblas::Point::GetX(void)const " (?GetX at Point@liblas@@QBENXZ)
error LNK2001: unresolved external symbol "public: double __thiscall 
liblas::Point::GetY(void)const " (?GetY at Point@liblas@@QBENXZ)
error LNK2001: unresolved external symbol "public: double __thiscall 
liblas::Point::GetZ(void)const " (?GetZ at Point@liblas@@QBENXZ)
error LNK2001: unresolved external symbol "public: class liblas::Reader 
__thiscall liblas::ReaderFactory::CreateWithStream(class 
std::basic_istream<char,struct std::char_traits<char> > &)" 
(?CreateWithStream at ReaderFactory@liblas@@QAE?AVReader at 2@AAV?$basic_istream at DU?$char_traits at D@std@@@std@@@Z)
error LNK2001: unresolved external symbol "public: __thiscall 
liblas::Reader::~Reader(void)" (??1Reader at liblas@@QAE at XZ)
error LNK2001: unresolved external symbol "public: class liblas::Header 
const & __thiscall liblas::Reader::GetHeader(void)const " 
(?GetHeader at Reader@liblas@@QBEABVHeader at 2@XZ)
error LNK2001: unresolved external symbol "public: bool __thiscall 
liblas::Header::Compressed(void)const " (?Compressed at Header@liblas@@QBE_NXZ)

This is followed by a "a few more" errors of these in the same manner. 
What am I doing wrong? I guess the fix is obvious for those who knows, 
but I'm not one of them. If you could point me in the right direction, 
it would be greatly appreciated.

Thanks in advance


More information about the Liblas-devel mailing list