g++ (Debian 4.7.2-5) 4.7.2 fails to find Json constructors on a 32-bit machine.
[ 81%] Built target grive [ 86%] Built target btest Linking CXX executable grive ../libgrive/libgrive.a(State.cc.o): In functiongr::v1::State::Write(boost::filesystem3::path const&) const':
State.cc:(.text+0x1778): undefined reference to gr::Json::Json<long>(long const&)' State.cc:(.text+0x17fa): undefined reference togr::Json::Json(unsigned long const&)'
State.cc:(.text+0x18cd): undefined reference to gr::Json::Json<long>(long const&)' collect2: error: ld returned 1 exit status make[2]: *** [grive/grive] Error 1 make[1]: *** [grive/CMakeFiles/grive_executable.dir/all] Error 2 make: *** [all] Error 2
It builds without problem if I change Json::Json( const boost::int32_t& l ) to Json::Json( const long& l ) and Json::Json( const boost::uint32_t& l ) to Json::Json( const unsigned long& l )
Not sure how to avoid this error more correctly... Also can I ask you - what for you're using one template constructor with many "template<>" implementations instead of just many overloaded constructors for different types?
g++ (Debian 4.7.2-5) 4.7.2 fails to find Json constructors on a 32-bit machine.
[ 81%] Built target grive [ 86%] Built target btest Linking CXX executable grive ../libgrive/libgrive.a(State.cc.o): In function
gr::v1::State::Write(boost::filesystem3::path const&) const': State.cc:(.text+0x1778): undefined reference togr::Json::Json<long>(long const&)' State.cc:(.text+0x17fa): undefined reference to
gr::Json::Jsongr::Json::Json<long>(long const&)' collect2: error: ld returned 1 exit status make[2]: *** [grive/grive] Error 1 make[1]: *** [grive/CMakeFiles/grive_executable.dir/all] Error 2 make: *** [all] Error 2
It builds without problem if I change Json::Json( const boost::int32_t& l ) to Json::Json( const long& l ) and Json::Json( const boost::uint32_t& l ) to Json::Json( const unsigned long& l )
Not sure how to avoid this error more correctly... Also can I ask you - what for you're using one template constructor with many "template<>" implementations instead of just many overloaded constructors for different types?