看上去一大堆怪怪的东西.....
(g++)
typedef TSMapTemp<string, UpdateItemVec> g_update_item_map;
一开始没有 加上typedef就出现这种怪异的错误
g++ -L"." -L../libylog cfg_helper.o clog.o comm_func.o datapack_handler.o db_helper.o db_mgr.o dcs_helper.o ex_network_mgr.o lock_wrapper.o main.o monitor_mgr.o mon_node.o myapp.o network.o node_store.o qitem.o routine_mgr.o rsr_cleaner.o tcp_socket.o test_helper.o udp_socket.o -ldl -lsybdb -lpthread -lylog -o "../bin/cts"
main.o: In function `__tcf_9':
/root/cts/src/code/main.cpp:36: multiple definition of `g_update_item_map'
datapack_handler.o:/root/cts/src/code/datapack_handler.cpp:34: first defined here
monitor_mgr.o: In function `CMonitorMgr':
/root/cts/src/code/monitor_mgr.cpp:33: multiple definition of `g_update_item_map'
datapack_handler.o:/root/cts/src/code/datapack_handler.cpp:34: first defined here
mon_node.o: In function `__tcf_4':
/usr/lib/gcc/i386-redhat-linux/4.1.1/http://www.cnblogs.com/http://www.cnblogs.com/include/c++/4.1.1/iostream:76: multiple definition of `g_update_item_map'
datapack_handler.o:/root/cts/src/code/datapack_handler.cpp:34: first defined here
myapp.o: In function `CMyApp':
/root/cts/src/code/myapp.cpp:93: multiple definition of `g_update_item_map'
datapack_handler.o:/root/cts/src/code/datapack_handler.cpp:34: first defined here
node_store.o: In function `__tcf_5':
/usr/lib/gcc/i386-redhat-linux/4.1.1/http://www.cnblogs.com/http://www.cnblogs.com/include/c++/4.1.1/iostream:76: multiple definition of `g_update_item_map'
datapack_handler.o:/root/cts/src/code/datapack_handler.cpp:34: first defined here
routine_mgr.o: In function `__tcf_4':
/usr/lib/gcc/i386-redhat-linux/4.1.1/http://www.cnblogs.com/http://www.cnblogs.com/include/c++/4.1.1/iostream:76: multiple definition of `g_update_item_map'
datapack_handler.o:/root/cts/src/code/datapack_handler.cpp:34: first defined here
rsr_cleaner.o: In function `__tcf_1':
/usr/lib/gcc/i386-redhat-linux/4.1.1/http://www.cnblogs.com/http://www.cnblogs.com/include/c++/4.1.1/iostream:76: multiple definition of `g_update_item_map'
datapack_handler.o:/root/cts/src/code/datapack_handler.cpp:34: first defined here
collect2: ld 返回 1