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

Mateusz Loskot mateusz at loskot.net
Thu Jan 28 15:04:16 EST 2010


esteban70 at libero.it wrote:
>> ----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):

Are you sure it happens when you build your program in Release mode?

The liblas.lib is for Release mode only and the behaviour you're
describing is likely to happen while building in Debug mode.
Please, remember that the official binaries of libLAS for Windows
are prepared in Release mode only. It is not possible to provide
users with Debug version of binaries.

> 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.

Yes, building it on your own is the best option, in fact.

> nmake.opt  must be modified with the following lines for VS10 support
> 
> !ELSEIF "$(_NMAKE_VER)" == "10.00.21003.01" MSVCVER = 10.0

Thanks, I'll commit this update.

> 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?

Yes, I suppose it is a typo.

Hobu, is it?

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


More information about the Liblas-devel mailing list