C++ API

265 views
Skip to first unread message

stephie

unread,
Apr 15, 2011, 10:42:32 AM4/15/11
to LAStools - efficient command line tools for LIDAR processing
Hi,

I would like to use the LASlib C++ API.
I created my new project and at linker->input->additional dependencies
I put LASlib.li (b I got it when I download the laslib.zip). However,
I have problem while building ii. Followings are the problem:

1>LASlib.lib(lasreadersingle.obj) : error LNK2019: unresolved external
symbol "public: long __thiscall istream::tellg(void)" (?
tellg@istream@@QAEJXZ) referenced in function "public: int __thiscall
LASreaderSingle::open(class istream &)" (?
open@LASreaderSingle@@QAEHAAVistream@@@Z)
1>LASlib.lib(lasreadersingle.obj) : error LNK2019: unresolved external
symbol "public: int __thiscall istream::get(void)" (?
get@istream@@QAEHXZ) referenced in function "public: virtual unsigned
int __thiscall ByteStreamInIstream::getByte(void)" (?
getByte@ByteStreamInIstream@@UAEIXZ)
1>LASlib.lib(lasreadersingle.obj) : error LNK2019: unresolved external
symbol "public: class istream & __thiscall istream::read(char
*,int)" (?read@istream@@QAEAAV1@PADH@Z) referenced in function
"public: virtual bool __thiscall
ByteStreamInIstream::getBytes(unsigned char *,unsigned int)" (?
getBytes@ByteStreamInIstream@@UAE_NPAEI@Z)
1>LASlib.lib(laswritersingle.obj) : error LNK2019: unresolved external
symbol "public: long __thiscall ostream::tellp(void)" (?
tellp@ostream@@QAEJXZ) referenced in function "public: int __thiscall
LASwriterSingle::open(class ostream &,class LASheader *,enum
LASzip::Algorithm)" (?
open@LASwriterSingle@@QAEHAAVostream@@PAVLASheader@@W4Algorithm@LASzip@@@Z)
1>LASlib.lib(laswritersingle.obj) : error LNK2019: unresolved external
symbol "public: class ostream & __thiscall ostream::put(unsigned
char)" (?put@ostream@@QAEAAV1@E@Z) referenced in function "public:
virtual bool __thiscall ByteStreamOutOstream::putByte(unsigned
char)" (?putByte@ByteStreamOutOstream@@UAE_NE@Z)
1>LASlib.lib(laswritersingle.obj) : error LNK2019: unresolved external
symbol "public: class ostream & __thiscall ostream::write(char const
*,int)" (?write@ostream@@QAEAAV1@PBDH@Z) referenced in function
"public: virtual bool __thiscall
ByteStreamOutOstream::putBytes(unsigned char const *,unsigned int)" (?
putBytes@ByteStreamOutOstream@@UAE_NPBEI@Z)
1>LASlib.lib(laswritersingle.obj) : error LNK2019: unresolved external
symbol "public: class ostream & __thiscall ostream::seekp(long)" (?
seekp@ostream@@QAEAAV1@J@Z) referenced in function "public: virtual
bool __thiscall ByteStreamOutOstream::seek(long)" (?
seek@ByteStreamOutOstream@@UAE_NJ@Z)
1>LASlib.lib(laswritersingle.obj) : error LNK2019: unresolved external
symbol "public: class ostream & __thiscall ostream::seekp(long,enum
ios::seek_dir)" (?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z)
referenced in function "public: virtual bool __thiscall
ByteStreamOutOstream::seekEnd(void)" (?
seekEnd@ByteStreamOutOstream@@UAE_NXZ)
1>C:\Users\sdellyta\Documents\Visual Studio 2010\Projects\lasreaader
\Debug\lasreaader.exe : fatal error LNK1120: 8 unresolved externals

Sorry for the messy file, but I really have no idea what's the cause
of the problem.

Martin Isenburg

unread,
Apr 15, 2011, 10:57:22 AM4/15/11
to last...@googlegroups.com, stephie
hello,
 
the laslib.lib library that is in the laslib/lib folder of the lastools.zip or laslib.zip distribution was built with MSVC 6.0. you are using a much new version of visual studio that i have not yet tried to compile on. i would not be surprised if the stream handlng - including function signatures - between the two compiler version has changed.
 
i suggest you recompile laslib.zip with your version of visual studio. if that still does not work you could choose to delete all the istream/ostream stuff. laslib can work with either, the stdio with FILE* and the istream/ostream libraries.
if you manage to compile laslib.lib with your version of visual studio please let me know.
 
martin @lastools
 

--
You are subscribed to the group
"LAStools - efficient command line tools for LIDAR processing"
You can download LAStools at
http://www.cs.unc.edu/~isenburg/lastools/
You can visit the LAStools group at
http://groups.google.com/group/lastools/

Reply all
Reply to author
Forward
Message has been deleted
0 new messages