简体   繁体   中英

Compilation Errors in Visual Studio 2012

I'm been trying for the last couple of hours to solve an error that I can't get rid of. Here it is the gist: https://gist.github.com/pluralism/11294490

I'm out of ideas because everything looks correct for me. The compilation error I'm getting is the following:

1>MenuCAL.obj : error LNK2005: "void __cdecl printSquareArray(int * *,unsigned int)" (?printSquareArray@@YAXPAPAHI@Z) already defined in calproject.obj 1>C:\\Users\\Andre Pinheiro\\Desktop\\calproject\\Debug\\calproject.exe : fatal error LNK1169: one or more multiply defined symbols found

If you need other files please feel free to ask. Thanks in advance!

If you want to define printSquareArray in a header, mark it inline to allow a definition in every translation unit that includes the header.

Alternatively, move the definition into a source file, so it's only defined once.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM