[pdal] Compiling with Visual Studio 2015

Howard Butler howard at hobu.co
Tue Jan 5 06:26:00 PST 2016


> On Jan 5, 2016, at 8:20 AM, Kristian Evers <kreve at sdfe.dk> wrote:
> 
> Hello,
> 
> I am trying to build PDAL with Visual Studio 2015 Community version. I am aware that it is recommended to build with VS2012, but since there’s a newer and fully featured version freely available I believe that’s the better choice.
>  So far I haven’t been able to get build the code. I’ve been following the build howto on the pdal website (http://www.pdal.io/compilation/windows.html). Unfortunately it is a bit outdated but despite a few discrepancies in the text I’ve managed to create a VS2015 solution with cmake. When trying to build the solution I get a lot of errors related to C++11 data types (int32_t etc.). Here’s an example:
> 
> 13>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(38): error C2039: 'int32_t': is not a member of '`global namespace''
> 13>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint(38): error C2873: 'int32_t': symbol cannot be used in a using-declaration
> 
> Basically the errors state that data types defined in cstdint are not accessible in the global namespace. Adding ‘using namespace std’ at the top of a .cpp-file doesn’t change this. Neither does including stdint.h instead of cstdint.
> There’s an error for each data type defined in the cstdint header. It would seem that the errors are raised (for each type) every time cstdint is included. Errors are also raised when declaring variables with cstdint-types. I haven’t been able to pinpoint where the problem starts, but since cstdint was first introduced in Visual Studio 2012 there is probably a few lines  of code that handles this situation. My guess is that the most recent version isn’t taken care of in that bit of code. Either in the source code or the makefiles.
> 
> Any ideas on how to resolve this problem?

Kristian,

I don't have a quick solution for you, but I presume it is some kind of MSVC definition that must be switched on or some mix of include file operations to allow things to work. It does work on MSVC 2012, which is what we use to build OSGeo4W64 and AppVeyor continuous integration builds.

PDAL is built with AppVeyor on MSVC 2012 every time code is pushed to the repository. See https://ci.appveyor.com/project/hobu/pdal/history for details.

Howard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20160105/457d22c3/attachment.sig>


More information about the pdal mailing list