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

Mateusz Loskot mateusz at loskot.net
Wed Jan 27 14:03:04 EST 2010


esteban70 at libero.it wrote:
> Thank you Mateusz,
> 
> now i have another problem...
> 
> The linker give me a bunch of errors.
> 
> 1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of
> other libs; use /NODEFAULTLIB:library 1>liblas.lib(reader10.obj) :
> warning LNK4049: locally defined symbol ?? 
> 1?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ
> (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> >(void)) imported 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(reader11.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) 
> 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)
> 
> I have reported only few lines of 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.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org


More information about the Liblas-devel mailing list