Skip to content

compile errors with mLibExternal #1

@amonszpart

Description

@amonszpart

Hi,

Getting mLibExternal to compile (on Ubuntu, GCC 4.9.4) is quite tricky, with some problems definitely not being a compiler problem. Is there a newer version of it online somewhere?

  • std::ostream and std::istream does not seem take boost::asio::streambuf* and ios::binary as 2constructor parameters, remove the openmode?:

    • mLib/include/ext-boost/serialization.h:38:14: error: no matching function for call to ‘std::basic_ostream<char>::basic_ostream(boost::asio::streambuf*, const openmode&)’ , m_ia(m_is) { }
    • mLib/include/ext-boost/serialization.h:39:14: error: no matching function for call to ‘std::basic_ostream<char>::basic_ostream(boost::asio::streambuf*, const openmode&)’ , m_ia(m_is) { }
    • mLib/include/ext-boost/serialization.h:245:41: error: no matching function for call to ‘std::basic_ostream<char>::basic_ostream(boost::asio::streambuf*, const openmode&)’ (with Boost version 1.58)
  • toJSON does not seem to be able to get resolved for vec<int64_t> (add template <typename T> ostream& toJSON(ostream& os, const T& x); at line 73 in json.h):

In file included from libsg/segmentation/Part.h:7:0,
    from segmentation/SegmentGroup.h:8,
    from libsg/core/Scan.h:8,
    from libsg/core/Recording.cpp:8:
    libsg/io/json.h: In instantiation of ‘std::ostream& sg::io::toJSON(std::ostream&, sg::vec<Vector3T>&) [with T = long int; std::ostream = std::basic_ostream<char>; sg::vec<Vector3T> = std::vector<long int, std::allocator<long int> >]’:
    libsg/core/Recording.cpp:254:59:   required from here
    libsg/io/json.h:90:20: error: no matching function for call to ‘toJSON(std::ostream&, const value_type&)’
    toJSON(os, x[i]) << ",";
                  ^
  • missing std:: from endl:

    • mLib/include/core-math/PCA.cpp:83:45: error: ‘endl’ was not declared in this scope std::cout << "Computing eigensystem..." << endl;
    • mLib/include/core-math/PCA.cpp:105:104: error: ‘endl’ was not declared in this scope std::cout << "Energy at " << dimIndex + 1 << " terms: " << cumulativeEnergy / sum * 100.0f << "%" << endl;
  • _means.size instead of dimension:

    • mLib/include/core-math/PCA.cpp:141:20: error: ‘dimension’ was not declared in this scope result.resize(dimension);
  • need explicit std namespace around member class: namespace std { struct hash<...>{}; }

    • mLib/include/core-util/sparseGrid3.h:6:13: error: specialization of ‘template<class _Tp> struct std::hash’ in different namespace [-fpermissive] struct std::hash<ml::vec3i> : public std::unary_function<ml::vec3i, size_t> {
  • need this-> or using Grid3<FLoatType>::getDimX; for parent functions:

    • mLib/include/core-base/distanceField3.h:142:48: error: there are no arguments to ‘getDimX’ that depend on a template parameter, so a declaration of ‘getDimX’ must be available [-fpermissive] vec3<FloatType> maxBound((FloatType)getDimX() - 1, (FloatType)getDimY() - 1, (FloatType)getDimZ() - 1);
    • mLib/include/core-base/distanceField3.h:161:51: error: there are no arguments to ‘getDimX’ that depend on a template parameter, so a declaration of ‘getDimX’ must be available [-fpermissive] (FloatType)res.getDimX() / (FloatType)getDimX(),
    • template <typename T> class NumericGrid : public Grid<T> { using Grid<T>::m_data; using Grid<T>::m_rows; using Grid<T>::m_cols;
    • template <typename T, typename NumT = float> class BinnedGrid : public Grid<T> { using Grid<T>::allocate; using Grid<T>::m_rows; using Grid<T>::m_cols;
  • missing ml:: in front of vec3f:

    • /mLib/include/ext-boost/serialization.h:182:5: error: ‘vec3f’ was not declared in this scope vec3f v[4];
  • NumericGrid::minElement() needs to use iColMin instead of iColMax;

  • Predeclared enum not defined (just comment it out):

    • libsg/libsg.h:152:6: error: use of enum ‘PartType’ without previous declaration enum PartType;
  • Need #include "util/eigenutil.h"; #include "io/json.h"; at the top of Part.h:

    • libsg/segmentation/Part.h:85:25: error: ‘eigenutil’ is not a namespace-name using namespace sg::eigenutil;
    • libsg/segmentation/Part.h:89:5: error: ‘toFloatVector’ is not a member of ‘sg::io’ sg::io::toFloatVector(obbIn["centroid"], &centroidArr);
  • Useless typedef (comment it out):

    • libsg/segmentation/SegmentGroup.h:284:21: error: declaration of ‘typedef sg::segmentation::VecSegPtr sg::segmentation::SegmentGroupsRecord::VecSegPtr’ [-fpermissive] typedef VecSegPtr VecSegPtr;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions