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

  • 相关阅读:
    动态规划0-1背包问题
    在网页上加入运行代码的功能
    关于CSS基础框架的学习
    Hadoop综合大作业
    hive基本操作与应用
    用mapreduce 处理气象数据集
    熟悉常用的HBase操作,编写MapReduce作业
    爬虫大作业
    熟悉常用的HDFS操作
    数据结构化与保存
  • 原文地址:https://www.cnblogs.com/vimmer/p/2506470.html
Copyright © 2011-2022 走看看