Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8666891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:50:30+00:00 2026-06-12T17:50:30+00:00

I am trying to build a big project in Mac OS X with cmake

  • 0

I am trying to build a big project in Mac OS X with cmake and ran into following error which i am unable to solve.

Archive.hpp:92:30: error: base specifier must name a class
    struct Derived : T, Fallback { };

Code:

template<typename T>
class has_save_func
{
    struct Fallback { int save; }; // add member name "X"
    struct Derived : T, Fallback { };
    ...

Furthermore i have following:

Archive.hpp:137:13: error: type 'unsigned long' cannot be used prior to '::'

Code:

template <class A>
static bool save(const A& data, class OutputArchive& oarchive, const std::string& id, typename boost::enable_if_c<has_save_func<A>::value, A>::type* def=NULL){
    // todo check if A actually is friend with Access class, else return false
    A::save(data, oarchive); // ! Error on this line !
    return true;
}

template <class A>
static bool save(const A& data, class OutputArchive& oarchive, const std::string& id, typename boost::disable_if_c<has_save_func<A>::value, A>::type* def=NULL){
    // todo check if A actually is friend with Access class, else return false
    return serialization::save<A>( data, oarchive, id);
}

Code calling (OutputArchive.hpp):

template<class T>
void write(const T& data, const std::string& id){
    // the data method must have an implementation of load/save and if not then we try the generic write
    // method which could provide a solution by the implementation itself
    writeEnterScope(id);
    try {
        Archive::Access::save<T>(data, *this, id);
    } catch (...){
        // we fall back to this call
        boost::any adata(data);
        write(adata, id);
    }
    writeLeaveScope(id);
}

Code serializeutil.cpp

void save(const rw::math::Q& tmp, OutputArchive& oar, const std::string& id){
    oar.write(tmp.size(), "size");
    for(int i=0;i<tmp.size();i++){
        oar.write(tmp[i],"q");
    }
}

Could it be a problem with the compiler im using?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:50:31+00:00Added an answer on June 12, 2026 at 5:50 pm

    I think that i may be responsible for the mentioned pieces of code. Something is missing though, and multiple persons already noticed this. The overloaded write functions on the OutputArchive which currently looks something like this:

    virtual void writeEnterScope(const std::string& id) = 0;
    virtual void writeLeaveScope(const std::string& id) = 0;
    virtual void writeEnterArray(const std::string& id) = 0;
    virtual void writeLeaveArray(const std::string& id) = 0;
    
    // writing primitives to archive
    virtual void write(bool val, const std::string& id) = 0;
    
    virtual void write(int val, const std::string& id) = 0;
    virtual void write(unsigned int val, const std::string& id){ write((int)val,id); }
    
    virtual void write(boost::uint64_t val, const std::string& id) = 0;
    virtual void write(double val, const std::string& id) = 0;
    virtual void write(const std::string&  val, const std::string& id) = 0;
    

    The serialization part of the software was not supposed to be used yet, but it ended up in the build system anyways. If you comment out the serialize directory in CMakeLists.txt in src/rwlibs then it should work. Or add a write function for an unsigned long:

    virtual void write(unsigned long val, const std::string& id){};
    

    And yes, i did look into Boost.Serialization before venturing into creating yet another serialization framework. I was however trying to create something that would be less intrusive, less templated and more user friendly…. Guess i failed at that…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build a big project with CMake but I struggle on
I'm trying build a method which returns the shortest path from one node to
Trying to build Xuggler under Windows. Xuggler is core native code functions wrapped into
Trying to build my project with ANT in idea 10 and I get a
I'm trying to build a big static library merging two static libraries. In moment
I am trying to build some big libraries, like Boost and OpenCV , from
I'm currently trying to build a code which is supposed to work on a
I've a project which ask me to do such a BIG search engine but
I am trying to automate my build process with cmake. There is currently only
I'm trying to move my project to CMake, and at the same time have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.