On Jan 10, 2011, at 10:26 AM, [email protected] wrote: > Finally I was able to use libLAS under VS2010. > > Those are some of the problem that I had to resolve in order to use the > library. > > It is necessary to specify LAS_DLL_IMPORT in the C++ preprocessor definition > otherwise LAS_DLL is undefined and including a libLAS .hpp causes a lot of > errors. > > This is the code in export.hpp: > > #if defined(LAS_DLL_EXPORT) > # define LAS_DLL __declspec(dllexport) > #elif defined(LAS_DLL_IMPORT) > # define LAS_DLL __declspec(dllimport) > > Isn't better to change the code into > > #if defined(BUILD_LAS_DLL) > # define LAS_DLL __declspec(dllexport) > #else > # define LAS_DLL __declspec(dllimport) > #endif > > so that if BUILD_LAS_DLL isn't defined during compilation, then it is > intended > to be used by the application?
I'll try to tighten this up. Thanks for the report. > > Another problem is that libLAS doesn't compile in presence of min() and max() > macros. Now that libLAS depends on boost maybe it can adopt the boost > guidelines to avoid inappropriate macro substitution (http://www.boost. > org/development/requirements.html). I had to insert a lot of () and > BOOST_PREVENT_MACRO_SUBSTITUTION to make it compile. Can you provide some example compiler warning/error output about this? I haven't ever had any complaint about this using MSVC 2010 express, however, I only use the Makefiles target, not the project build. Are the macros coming from libLAS or one of its dependencies? Howard_______________________________________________ Liblas-devel mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/liblas-devel
