libslic3r: Fix missing includes

Fix a lot of "undeclared" errors during compilation on top of the
current GNOME 45 Flatpak SDK.
This commit is contained in:
Bastien Nocera 2023-12-21 10:09:19 +01:00 committed by Lane.Wei
parent 7ce38201c8
commit f54fb4a1cf
18 changed files with 31 additions and 2 deletions

View File

@ -17,6 +17,7 @@
#define BOOST_NO_CXX17_HDR_STRING_VIEW #define BOOST_NO_CXX17_HDR_STRING_VIEW
#endif #endif
#include <boost/log/trivial.hpp>
#include <boost/multiprecision/integer.hpp> #include <boost/multiprecision/integer.hpp>
#include <boost/rational.hpp> #include <boost/rational.hpp>

View File

@ -16,6 +16,7 @@
#include <float.h> #include <float.h>
#include <assert.h> #include <assert.h>
#include <regex>
#if __has_include(<charconv>) #if __has_include(<charconv>)
#include <charconv> #include <charconv>

View File

@ -1,6 +1,7 @@
#include "Print.hpp" #include "Print.hpp"
#include "ToolOrdering.hpp" #include "ToolOrdering.hpp"
#include "Layer.hpp" #include "Layer.hpp"
#include "ClipperUtils.hpp"
// #define SLIC3R_DEBUG // #define SLIC3R_DEBUG

View File

@ -1,6 +1,7 @@
#include "GCodeReader.hpp" #include "GCodeReader.hpp"
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/split.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/fstream.hpp> #include <boost/nowide/fstream.hpp>
#include <boost/nowide/cstdio.hpp> #include <boost/nowide/cstdio.hpp>
#include <fstream> #include <fstream>

View File

@ -1,6 +1,7 @@
#include "Model.hpp" #include "Model.hpp"
#include "libslic3r.h" #include "libslic3r.h"
#include "BuildVolume.hpp" #include "BuildVolume.hpp"
#include "ClipperUtils.hpp"
#include "Exception.hpp" #include "Exception.hpp"
#include "Model.hpp" #include "Model.hpp"
#include "ModelArrange.hpp" #include "ModelArrange.hpp"
@ -26,6 +27,7 @@
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/filesystem/string_file.hpp> #include <boost/filesystem/string_file.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
#include <boost/nowide/iostream.hpp> #include <boost/nowide/iostream.hpp>

View File

@ -9,6 +9,7 @@
#define BOOST_NO_CXX17_HDR_STRING_VIEW #define BOOST_NO_CXX17_HDR_STRING_VIEW
#endif #endif
#include <boost/log/trivial.hpp>
#include <boost/multiprecision/integer.hpp> #include <boost/multiprecision/integer.hpp>
#include <boost/rational.hpp> #include <boost/rational.hpp>

View File

@ -1,10 +1,13 @@
#ifndef PNGREAD_HPP #ifndef PNGREAD_HPP
#define PNGREAD_HPP #define PNGREAD_HPP
#include <cstdint>
#include <vector> #include <vector>
#include <string> #include <string>
#include <istream> #include <istream>
#include <boost/format.hpp>
namespace Slic3r { namespace png { namespace Slic3r { namespace png {
// Interface for an input stream of encoded png image data. // Interface for an input stream of encoded png image data.

View File

@ -13,6 +13,7 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/algorithm/clamp.hpp> #include <boost/algorithm/clamp.hpp>
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/range/adaptor/transformed.hpp> #include <boost/range/adaptor/transformed.hpp>
#include <boost/nowide/cenv.hpp> #include <boost/nowide/cenv.hpp>
#include <boost/nowide/cstdio.hpp> #include <boost/nowide/cstdio.hpp>

View File

@ -24,6 +24,10 @@
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
#include <boost/nowide/fstream.hpp>
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
//BBS: add json support //BBS: add json support
#include "nlohmann/json.hpp" #include "nlohmann/json.hpp"

View File

@ -3,6 +3,8 @@
#include <cfloat> #include <cfloat>
#include <boost/log/trivial.hpp>
namespace Slic3r { namespace Slic3r {
// Add or remove support modifier ModelVolumes from model_object_dst to match the ModelVolumes of model_object_new // Add or remove support modifier ModelVolumes from model_object_dst to match the ModelVolumes of model_object_new

View File

@ -2,7 +2,9 @@
#include "PrintBase.hpp" #include "PrintBase.hpp"
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/log/trivial.hpp>
#include "I18N.hpp" #include "I18N.hpp"

View File

@ -1,4 +1,5 @@
#include "PrintConfig.hpp" #include "PrintConfig.hpp"
#include "ClipperUtils.hpp"
#include "Config.hpp" #include "Config.hpp"
#include "I18N.hpp" #include "I18N.hpp"

View File

@ -10,6 +10,7 @@
#include <boost/random.hpp> #include <boost/random.hpp>
#include <boost/generator_iterator.hpp> #include <boost/generator_iterator.hpp>
#include <boost/log/trivial.hpp>
#include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp> #include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_io.hpp>

View File

@ -7,6 +7,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/log/trivial.hpp>
#include "Standard_TypeDef.hxx" #include "Standard_TypeDef.hxx"
#include "STEPCAFControl_Reader.hxx" #include "STEPCAFControl_Reader.hxx"
#include "BRepMesh_IncrementalMesh.hxx" #include "BRepMesh_IncrementalMesh.hxx"

View File

@ -1,9 +1,9 @@
#ifndef slic3r_Text_Shape_hpp_ #ifndef slic3r_Text_Shape_hpp_
#define slic3r_Text_Shape_hpp_ #define slic3r_Text_Shape_hpp_
namespace Slic3r { #include "libslic3r/TriangleMesh.hpp"
class TriangleMesh;
namespace Slic3r {
struct TextResult struct TextResult
{ {
TriangleMesh text_mesh; TriangleMesh text_mesh;

View File

@ -1,3 +1,4 @@
#include "clipper/clipper_z.hpp"
#include "ClipperUtils.hpp" #include "ClipperUtils.hpp"
#include "ExtrusionEntityCollection.hpp" #include "ExtrusionEntityCollection.hpp"
#include "Layer.hpp" #include "Layer.hpp"

View File

@ -19,6 +19,10 @@
#include "BuildVolume.hpp" #include "BuildVolume.hpp"
#include "ClipperUtils.hpp" #include "ClipperUtils.hpp"
#include <boost/log/trivial.hpp>
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
#ifndef M_PI #ifndef M_PI
#define M_PI 3.1415926535897932384626433832795 #define M_PI 3.1415926535897932384626433832795
#endif #endif

View File

@ -2,6 +2,7 @@
#include "Model.hpp" #include "Model.hpp"
#include <boost/container/small_vector.hpp> #include <boost/container/small_vector.hpp>
#include <boost/log/trivial.hpp>
#ifndef NDEBUG #ifndef NDEBUG
// #define EXPENSIVE_DEBUG_CHECKS // #define EXPENSIVE_DEBUG_CHECKS