zoukankan      html  css  js  c++  java
  • 定义一个map少了一个typedef后报出来的错误

    看上去一大堆怪怪的东西.....

    (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

  • 相关阅读:
    FFT学习笔记
    FWT(Fast Walsh Transformation)快速沃尔什变换学习笔记
    GMS2游戏开发学习历程
    [BZOJ3238][AHOI2013]差异 [后缀数组+单调栈]
    Trie树简单讲解
    自己的题
    小技巧
    编程注意事项
    构造方法
    递归
  • 原文地址:https://www.cnblogs.com/vimmer/p/2506470.html
Copyright © 2011-2022 走看看