[boost-install]update old version to new one by 'bjam install'
i have install 1.43 version in my system,after use “./bjam install” to intall boost1.44,i met the following error. [root@localhost gridcast]# g++ -o datetime datetime_tcp_async_server.cpp -lpthread -lboost_system -L/usr/local/lib datetime_tcp_async_server.cpp:142:2: 警告:文件未以空白行结束 /tmp/ccjG0R2d.o: In function `__static_initialization_and_destruction_0(int, int)': datetime_tcp_async_server.cpp:(.text+0x16c): undefined reference to `boost::system::get_system_category()' datetime_tcp_async_server.cpp:(.text+0x176): undefined reference to `boost::system::get_generic_category()' datetime_tcp_async_server.cpp:(.text+0x180): undefined reference to `boost::system::get_generic_category()' datetime_tcp_async_server.cpp:(.text+0x18a): undefined reference to `boost::system::get_generic_category()' datetime_tcp_async_server.cpp:(.text+0x194): undefined reference to `boost::system::get_system_category()' /tmp/ccjG0R2d.o: In function `boost::asio::error::get_system_category()': datetime_tcp_async_server.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv[boost::asio::error::get_system_category()]+0x7): undefined reference to `boost::system::get_system_category()' /tmp/ccjG0R2d.o: In function `boost::system::error_code::error_code()': datetime_tcp_async_server.cpp:(.text._ZN5boost6system10error_codeC1Ev[boost::system::error_code::error_code()]+0x10):undefined reference to `boost::system::get_system_category()' collect2: ld 返回 1 so i delete /usr/local/include/boost dir ,and rerun ”./bjam install” -bash-3.2# g++ datetime_tcp_async_server.cpp -lpthread datetime_tcp_async_server.cpp:142:2: warning: no newline at end of file /tmp/ccQeKssV.o: In function `__static_initialization_and_destruction_0(int, int)': datetime_tcp_async_server.cpp:(.text+0x176): undefined reference to `boost::system::generic_category()' datetime_tcp_async_server.cpp:(.text+0x182): undefined reference to `boost::system::generic_category()' datetime_tcp_async_server.cpp:(.text+0x18e): undefined reference to `boost::system::system_category()' /tmp/ccQeKssV.o: In function `boost::system::get_system_category()': datetime_tcp_async_server.cpp:(.text._ZN5boost6system19get_system_categoryEv[boost::system::get_system_category()]+0x5): undefined reference to `boost::system::system_category()' /tmp/ccQeKssV.o: In function `boost::system::error_code::error_code()': datetime_tcp_async_server.cpp:(.text._ZN5boost6system10error_codeC1Ev[boost::system::error_code::error_code()]+0x17): undefined reference to `boost::system::system_category()' collect2: ld returned 1 exit status --------------------------------- the name changed from `boost::system::get_generic_category()' to `boost::system::generic_category()',so it seems if i already have an old version of boost,i need remove it clearly to reinstall the new one by myself.
hongleij wrote:
i have install 1.43 version in my system,after use “./bjam install” to intall boost1.44,i met the following error.
[root@localhost gridcast]# g++ -o datetime datetime_tcp_async_server.cpp -lpthread -lboost_system [-L/usr/local/lib
datetime_tcp_async_server.cpp:142:2: 警告:文件未以空白行结束
/tmp/ccjG0R2d.o: In function `__static_initialization_and_destruction_0(int, int)':
datetime_tcp_async_server.cpp:(.text+0x16c): undefined reference to `boost::system::get_system_category()'
....
the name changed from `boost::system::get_generic_category()' to `boost::system::generic_category()',so it seems if i already have an old version of boost,i need remove it clearly to reinstall the new one by myself.
You might want to add -I/usr/local/include to your compile command, perphaps? - Volodya
add -I/usr/local/include to your compile command won't solve the problem,it seems thar "bjam install" not fully overwrite the old version files included in /usr/local/include/boost dir.At 2010-10-10,"Vladimir Prus"
hongleij wrote:
i have install 1.43 version in my system,after use “./bjam install” to intall boost1.44,i met the following error.
[root@localhost gridcast]# g++ -o datetime datetime_tcp_async_server.cpp -lpthread -lboost_system [-L/usr/local/lib
datetime_tcp_async_server.cpp:142:2: 警告:文件未以空白行结束
/tmp/ccjG0R2d.o: In function `__static_initialization_and_destruction_0(int, int)':
datetime_tcp_async_server.cpp:(.text+0x16c): undefined reference to `boost::system::get_system_category()'
....
the name changed from `boost::system::get_generic_category()' to `boost::system::generic_category()',so it seems if i already have an old version of boost,i need remove it clearly to reinstall the new one by myself.
You might want to add -I/usr/local/include to your compile command, perphaps?
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
in /usr/local/inclue/boost/system dir,for update version:
[root@localhost system]# find ./ -type f -print|xargs grep "get_system_category" -n
./windows_error.hpp:110: { return error_code( e, get_system_category() ); }
./cygwin_error.hpp:49: { return error_code( e, get_system_category() ); }
./error_code.hpp:205: BOOST_SYSTEM_DECL const error_category & get_system_category();
./error_code.hpp:208: static const error_category & system_category = get_system_category();
./error_code.hpp:216: static const error_category & native_ecat = get_system_category();
./error_code.hpp:315: error_code() : m_val(0), m_cat(&get_system_category()) {}
./error_code.hpp:343: m_cat = &get_system_category();
./linux_error.hpp:102: { return error_code( e, get_system_category() ); }
not update from the old boost version.
[root@LOG system]# find ./ -type f -print|xargs grep "get_system_category" -n
./error_code.hpp:211: inline const error_category & get_system_category() { return system_category(); }
which seems that when i update boost by “bjam install” ,the /usr/local/inclue/boost/system/error_code.hpp not been overwrited,its still the older version.
At 2010-10-10,"Vladimir Prus"
hongleij wrote:
i have install 1.43 version in my system,after use “./bjam install” to intall boost1.44,i met the following error.
[root@localhost gridcast]# g++ -o datetime datetime_tcp_async_server.cpp -lpthread -lboost_system [-L/usr/local/lib
datetime_tcp_async_server.cpp:142:2: 警告:文件未以空白行结束
/tmp/ccjG0R2d.o: In function `__static_initialization_and_destruction_0(int, int)':
datetime_tcp_async_server.cpp:(.text+0x16c): undefined reference to `boost::system::get_system_category()'
....
the name changed from `boost::system::get_generic_category()' to `boost::system::generic_category()',so it seems if i already have an old version of boost,i need remove it clearly to reinstall the new one by myself.
You might want to add -I/usr/local/include to your compile command, perphaps?
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
hongleij
-
Vladimir Prus