Debugging system error! Need help
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Debugging system error! Need help

  1. #1
    Join Date
    Sep 2012
    Posts
    1

    Unhappy Debugging system error! Need help

    my projiect can't build, i don't understanding this problem, I think it about system
    This is result of project debugging

    1>------ Build started: Project: my, Configuration: Debug Win32 ------
    1>Build started 9/13/2012 11:04:08 PM.
    1>InitializeBuildStatus:
    1> Touching "Debug\my.unsuccessfulbuild".
    1>ClCompile:
    1> List.cpp
    1> Generating Code...
    1> Compiling...
    1> Stack.cpp
    1> Queue.cpp
    1> Poly.cpp
    1> Generating Code...
    1>ManifestResourceCompile:
    1> All outputs are up-to-date.
    1>Poly.obj : error LNK2005: "public: __thiscall List::List(void)" (??0List@@QAE@XZ) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: void __thiscall List::addFirst(int)" (?addFirst@List@@QAEXH@Z) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: void __thiscall List::clear(void)" (?clear@List@@QAEXXZ) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: __thiscall List::~List(void)" (??1List@@QAE@XZ) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: void __thiscall List::display(void)" (?display@List@@QAEXXZ) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: void __thiscall List::addConstant(int)" (?addConstant@List@@QAEXH@Z) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: void __thiscall List::addPoly(class List *)" (?addPoly@List@@QAEXPAV1@@Z) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: int __thiscall List::empty(void)" (?empty@List@@QAEHXZ) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: void __thiscall List::removeFirst(void)" (?removeFirst@List@@QAEXXZ) already defined in List.obj
    1>Poly.obj : error LNK2005: "public: void __thiscall List:rintPoly(void)" (?printPoly@List@@QAEXXZ) already defined in List.obj
    1>c:\users\my\documents\visual studio 2010\Projects\my\Debug\my.exe : fatal error LNK1169: one or more multiply defined symbols found
    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:02.48
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,090

    Re: Debugging system error! Need help

    Those are link errors. They have nothing to do with the system or debugging.

    It's telling you it's finding multiple definitions of some functions. You'll have to figure out why.

  3. #3
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Debugging system error! Need help

    Quote Originally Posted by Marin_Ngo View Post
    my projiect can't build, i don't understanding this problem, I think it about system
    This is result of project debugging
    Read the errors carefully. It is telling you that you have two (or more) copies of the List implementation in your project.

    Where is the constructor for List declared and defined? If it is in more than one module, then the linker is going to give you an error, and that is exactly what the problem is. You have the List constructor implemented in both List.cpp and Poly.cpp. You also have the entire List implementation implemented in both List.cpp and Poly.cpp. Why?

    Regards,

    Paul McKenzie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center