[pdal] Master not compiling in Visual Studio
OMeara, Whitney
WOMeara at Radiantblue.com
Tue Sep 23 07:03:02 PDT 2014
Hey everyone,
My name is Whitney. I worked with Brad Chambers a little bit on some PCL stuff a few months ago which was tangentially related to PDAL. I'm currently working on creating a Geowave reader and writer for PDAL. I had been working off of a slightly older branch, but yesterday I finally rebased with master.
Anyway, I'm emailing the list because the latest code in master doesn't build in Visual Studio. I included a list of the issues I encountered and my workarounds.
Issues:
* MetadataNodeImpl - 2 components to this issue
* Issue 1: In the sanitize method, this style of initialization is not supported in Visual C++
std::vector<std::string> to_replace = {";", ":", " ", "'", "\""};
* Issue 2: For some reason, Visual C++ is not happy about moving the private constructor for MetadataNodeImpl to Metadata.cpp
Fix: Fixed both issues by removing the sanitize method, moving the constructor back to the header the way it originally was, and adding a one-line sanitize method in the constructor after initialization:
std::replace_if(m_name.begin(), m_name.end(), boost::is_any_of(";: '\""), '_');
* PointBufferTest.cpp - 2 issues
* Issue 1: Visual C++ wants a const declaration for NUM_PTS
Fix: const point_count_t NUM_PTS = 1000000;
* Issue 2: random() is seemingly not available in Visual C++
Fix: rand() works as a replacement
* BpfReader.[hpp,cpp]
* Visual C++ is not happy about Charbuf being used in BpfReader.hpp.
* Only complains when trying to link seekoff and seekpos into BPFTest.
* If the Charbuf variable is removed from BpfReader.hpp, and relocated to BpfReader.cpp, the error goes away.
* This issue has really stumped me. I don't have a good solution...
These fixes work for me at the moment, but if you guys have a better way of resolving the issues, I'll be happy to pick up your changes the next time I rebase. I should also point out that I haven't taken the time to make sure my fixes work in Linux.
If you have any questions, let me know.
Thanks,
Whitney O'Meara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20140923/75cc24bd/attachment.html>
More information about the pdal
mailing list