R: Re: R: Re: [Liblas-devel] R: Visual Studio 2010 error

esteban70 at libero.it esteban70 at libero.it
Thu Jan 28 06:42:49 EST 2010


>----Messaggio originale----
>Da: mateusz at loskot.net
>Data: 27/01/2010 20.03
>A: "esteban70 at libero.it"<esteban70 at libero.it>
>Cc: <liblas-devel at lists.osgeo.org>
>Ogg: Re: R: Re: [Liblas-devel] R: Visual Studio 2010 error
>
>Which version of libLAS do you build?
>How do you build libLAS? Using NMAKE and makefile.vc or using Visual
>Studio project?
>
>Keep in mind, that you should build libLAS in debug mode
>regardless of which way you use:
>
>nmake /f makefile.vc BUILD_DEBUG=YES
>
>or select Debug configuration in Visual Studio.
>
>IOW, if you build your program in Debug, links against libLAS debug too.
>But, if you build your program in Release mode, link against libLAS
>built as Release too.

Using the latest version from liblas website (liblas-1.2.1-win32.zip) I'm 
unable to pass the linking phase.
Those are the errors I get in Release mode linking liblas.lib (i have listed 
only the errors for reader10.obj but those are the same for every .obj):

1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >(class std::basic_string<char,
struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??
0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at ABV01@@Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??
0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at PBD@Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: void __thiscall std::basic_stringstream<char,
struct std::char_traits<char>,class std::allocator<char> >::`vbase 
destructor'(void)" (__imp_??
_D?$basic_stringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEXXZ)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: __thiscall std::basic_stringstream<char,struct 
std::char_traits<char>,class std::allocator<char> >::basic_stringstream<char,
struct std::char_traits<char>,class std::allocator<char> >(int)" (__imp_??
0?$basic_stringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at H@Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) class std::basic_istream<char,struct std::
char_traits<char> > & __cdecl std::operator>><char,struct std::
char_traits<char> >(class std::basic_istream<char,struct std::char_traits<char> 
> &,char &)" (__imp_??$?
5DU?$char_traits at D@std@@@std@@YAAAV?$basic_istream at DU?$char_traits at D@std@@@0 at AAV10@AAD at Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: void __thiscall std::basic_ostringstream<char,
struct std::char_traits<char>,class std::allocator<char> >::`vbase 
destructor'(void)" (__imp_??
_D?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEXXZ)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: class std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> > __thiscall std::
basic_ostringstream<char,struct std::char_traits<char>,class std::
allocator<char> >::str(void)const " (__imp_?
str@?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBE?
AV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@2 at XZ)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: __thiscall std::basic_ostringstream<char,struct 
std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,
struct std::char_traits<char>,class std::allocator<char> >(int)" (__imp_??
0?$basic_ostringstream at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at H@Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: class std::basic_istream<char,struct std::
char_traits<char> > & __thiscall std::basic_istream<char,struct std::
char_traits<char> >::read(char *,int)" (__imp_?
read@?$basic_istream at DU?$char_traits at D@std@@@std@@QAEAAV12 at PADH@Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: class std::basic_istream<char,struct std::
char_traits<char> > & __thiscall std::basic_istream<char,struct std::
char_traits<char> >::seekg(long,int)" (__imp_?
seekg@?$basic_istream at DU?$char_traits at D@std@@@std@@QAEAAV12 at JH@Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: class std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> > & __thiscall std::
basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::
assign(char const *,unsigned int)" (__imp_?
assign@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV12 at PBDI@Z)
1>liblas.lib(reader10.obj) : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct 
std::char_traits<char> >::sputn(char const *,int)" (__imp_?
sputn@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEHPBDH at Z)

So it seems that the .lib shipped in liblas-1.2.1-win32.zip is unable to link 
against Visual Studio 10.

I have recompiled liblas using nmake with BUILD_DEBUG set to YES first and 
then set to NO.
Then I have linked liblas_d.lib in Debug mode e liblas.lib in Release mode. 
Doing so I can pass the linking phase and generate the exe files.

nmake.opt  must be modified with the following lines for VS10 support

!ELSEIF "$(_NMAKE_VER)" == "10.00.21003.01"
MSVCVER = 10.0

One last thing. The lib names in debug mode are:

LAS_LIB = liblas_d.lib
LAS_DLL = liblas_d1.dll
LAS_LIB_DLL = libl1as_i.lib

Are those names misspelled?

Thank Mateusz for your patience...


More information about the Liblas-devel mailing list