Matlab toolbox compilation boost serialization error

Issue #395 closed
Callum Robinson created an issue

Compiling matlab toolbox no longer works, since commit 6fef22f.

.../build/wrap/gtsam_unstable/gtsam_unstable_wrapper.cpp:60:1:   required from here
/usr/include/boost/serialization/access.hpp:116:11: error: 'class std::vector<long unsigned int, std::allocator<long unsigned int> >' has no member named 'serialize'

I believe this is due to the removal of #include <boost/serialization/vector.hpp> from FastVector.h

Adding this include back in seems to have fixed the problem:

/* ----------------------------------------------------------------------------

 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
 * Atlanta, Georgia 30332-0415
 * All Rights Reserved
 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)

 * See LICENSE for the license information

 * -------------------------------------------------------------------------- */

/**
 * @file    FastVector.h
 * @brief   A thin wrapper around std::vector that uses a custom allocator.
 * @author  Richard Roberts
 * @author  Frank Dellaert
 * @date    Feb 9, 2011
 */

#pragma once

#include <gtsam/base/FastDefaultAllocator.h>
#include <vector>
#include <boost/serialization/vector.hpp>

namespace gtsam {

/**
 * FastVector is a type alias to a std::vector with a custom memory allocator.
 * The particular allocator depends on GTSAM's cmake configuration.
 * @addtogroup base
 */
template <typename T>
using FastVector =
    std::vector<T, typename internal::FastDefaultVectorAllocator<T>::type>;

}  // namespace gtsam

Comments (2)

  1. Mike Sheffler

    @crown_crobinso, I think this should be fixed as of 6f8bfe0. Can you check to see if you are still having problems? If not, I think this issue can be closed.

  2. Log in to comment