The MASM Forum

General => The Campus => Topic started by: Grincheux on December 17, 2015, 03:47:14 AM

Title: POLINK: error: Symbol '_@Error_1' is multiply defined
Post by: Grincheux on December 17, 2015, 03:47:14 AM

Quote
POLINK: error: Symbol '_@Error_1' is multiply defined: 'PhR.obj' and 'PhR.obj'.
POLINK: error: Symbol '_@Exit' is multiply defined: 'PhR.obj' and 'PhR.obj'


When assembling with JWasm that's ok but errors while linking.
I thought that a label was local when it is defined into a PROC/ENDP statment?


How can I avoid this?
Title: Re: POLINK: error: Symbol '_@Error_1' is multiply defined
Post by: jj2007 on December 17, 2015, 03:57:31 AM
The more interesting question is why you are linking twice the same object file. Check your linker command line...
Title: Re: POLINK: error: Symbol '_@Error_1' is multiply defined
Post by: TWell on December 17, 2015, 04:03:42 AM
Sometimes using those anonymous labels @@ and @F or @B are useful.

EDIT: similar error with polink.exe only with debug info, not with ms link.exe
Source compiled with ml.exe  10.
Building D3D9_WebCam.exe.
POLINK: error: Symbol 'charLP' is multiply defined: 'D3D9_WebCam.obj' and 'D3D9_WebCam.obj'.
*** Error code: 1 ***
Title: Re: POLINK: error: Symbol '_@Error_1' is multiply defined
Post by: Grincheux on December 17, 2015, 05:07:35 AM
JJ2007 happily you are there. I am a donkey
[/size]
http://masm32.com/board/index.php?topic=4927.0 (http://masm32.com/board/index.php?topic=4927.0)
Title: Re: POLINK: error: Symbol '_@Error_1' is multiply defined
Post by: Grincheux on December 17, 2015, 05:55:15 AM
If you use RadAsm V3 here is the command line for the linker :


Quote
/SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /OUT:$O $C $R


Remove the "$M"

Title: Re: POLINK: error: Symbol '_@Error_1' is multiply defined
Post by: jj2007 on December 17, 2015, 11:29:23 AM
Quote from: Grincheux on December 17, 2015, 05:07:35 AM
JJ2007 happily you are there.

Merci, Philippe :icon14:
Happily there is always somebody awake here, 24h/24h. This is positive globalisation ;)