Archived

This topic is now archived and is closed to further replies.

MaximusDM_PT

linking errors

Recommended Posts

MaximusDM_PT    122
Hi, I''m trying to compile some files, with VC++, but I get these errors: Linking... main.obj : error LNK2005: "int nAltura" (?nAltura@@3HA) already defined in jogo.obj main.obj : error LNK2005: "int nLargura" (?nLargura@@3HA) already defined in jogo.obj main.obj : error LNK2005: "struct HINSTANCE__ * hInstance" (?hInstance@@3PAUHINSTANCE__@@A) already defined in jogo.obj main.obj : error LNK2005: "struct HDC__ * hMainDC" (?hMainDC@@3PAUHDC__@@A) already defined in jogo.obj main.obj : error LNK2005: "struct HWND__ * hWnd" (?hWnd@@3PAUHWND__@@A) already defined in jogo.obj main.obj : error LNK2005: "unsigned long nStartTime" (?nStartTime@@3KA) already defined in jogo.obj main.obj : error LNK2005: "struct _iobuf * log" (?log@@3PAU_iobuf@@A) already defined in jogo.obj sll.obj : error LNK2005: "int nAltura" (?nAltura@@3HA) already defined in jogo.obj sll.obj : error LNK2005: "int nLargura" (?nLargura@@3HA) already defined in jogo.obj sll.obj : error LNK2005: "struct HINSTANCE__ * hInstance" (?hInstance@@3PAUHINSTANCE__@@A) already defined in jogo.obj sll.obj : error LNK2005: "struct HDC__ * hMainDC" (?hMainDC@@3PAUHDC__@@A) already defined in jogo.obj sll.obj : error LNK2005: "struct HWND__ * hWnd" (?hWnd@@3PAUHWND__@@A) already defined in jogo.obj sll.obj : error LNK2005: "unsigned long nStartTime" (?nStartTime@@3KA) already defined in jogo.obj sll.obj : error LNK2005: "struct _iobuf * log" (?log@@3PAU_iobuf@@A) already defined in jogo.obj visual.obj : error LNK2005: "int nAltura" (?nAltura@@3HA) already defined in jogo.obj visual.obj : error LNK2005: "int nLargura" (?nLargura@@3HA) already defined in jogo.obj visual.obj : error LNK2005: "struct HINSTANCE__ * hInstance" (?hInstance@@3PAUHINSTANCE__@@A) already defined in jogo.obj visual.obj : error LNK2005: "struct HDC__ * hMainDC" (?hMainDC@@3PAUHDC__@@A) already defined in jogo.obj visual.obj : error LNK2005: "struct HWND__ * hWnd" (?hWnd@@3PAUHWND__@@A) already defined in jogo.obj visual.obj : error LNK2005: "unsigned long nStartTime" (?nStartTime@@3KA) already defined in jogo.obj visual.obj : error LNK2005: "struct _iobuf * log" (?log@@3PAU_iobuf@@A) already defined in jogo.obj visual.obj : error LNK2001: unresolved external symbol "void __cdecl Gera_resultado(unsigned long,struct node *,struct node *,struct node * * *,unsigned long * *,struct node * *,unsigned long *)" (?Gera_resultado@@YAXKPAUnode@@0PAPAPAU1@PAPAKPAPAU1@ PAK@Z) Debug/jogo.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Most of them say "already defined" but in all my headers I use the directives #ifndef...#define...#endif can someone help me here?

Share this post


Link to post
Share on other sites