Fix compilation on recent OSX versions

This commit is contained in:
Alessandro Ranellucci 2017-03-05 02:41:52 +01:00
parent a7f1cd50ab
commit abe22fa406
3 changed files with 5 additions and 4 deletions

View File

@ -23,7 +23,7 @@ if ($cpp_guess->is_gcc) {
push @cflags, qw(-U__STRICT_ANSI__);
}
my @ldflags = ();
if ($^O eq 'darwin' && `sw_vers -productVersion` =~ /\b10\.8\./) {
if ($^O eq 'darwin') {
push @cflags, qw(-stdlib=libc++);
push @ldflags, qw(-framework IOKit -framework CoreFoundation -lc++);

View File

@ -39,6 +39,7 @@ ClipperPath_to_Slic3rMultiPoint(const ClipperLib::Path &input)
retval.points.push_back(Point( (*pit).X, (*pit).Y ));
return retval;
}
template Polygon ClipperPath_to_Slic3rMultiPoint<Polygon>(const ClipperLib::Path &input);
template <class T>
T

View File

@ -103,11 +103,11 @@ OBJ::read(std::string input_file, Model* model)
// Read vertices.
assert((shape->mesh.vertices.size() % 3) == 0);
for (size_t v = 0; v < attrib.vertices.size(); ++v) {
for (size_t v = 0; v < attrib.vertices.size(); v += 3) {
points.push_back(Pointf3(
attrib.vertices[v],
attrib.vertices[++v],
attrib.vertices[++v]
attrib.vertices[v+1],
attrib.vertices[v+2]
));
}