Skip to content

link error from Ex2_04 and Ex2_05 #26

@LanceSab

Description

@LanceSab

Hi, I have problem running the example codes in chapter2. I am using Visual Studio 17.81.
I rename the main function of Ex2_04 and add a statement to return 0. When I add the main function from Ex2_05 in another .cpp file in the same project. I got error "Severity Code Description Project File Line Suppression State Details Error LNK1169 one or more multiply defined symbols found". If I put them into the same .cpp file, it works fine.
Could anyone explain me the reason?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions