WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
 
Forum
 

Link warning message, warning LNK4042: object specified more than once; extras ignored.

iceberg
Quote Post


New Member
*

Group: Members
Posts: 7
Member No.: 70
Joined: 4-June 04


When I use Link or Go All command,It displays
QUOTE
E:\Masm32\Bin\Link @"E:\Project\Five\link.war"

E:\Project\Five\Five.obj : warning LNK4042: object specified more than once; extras ignored

and compile can not go on.
What does it mean?
I use WinAsm v3.03.
Regards,

iceberg

Sponsored Links
PMEmail Poster
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2308
Member No.: 1
Joined: 12-May 04


Hi,

A rather long answer; Go All carries out these operations:

1.If there is an *.RC file in your project, it is compiled to a *.res file. IF and only if, the command line in Project-Properties...-Resource-Res To Obj is not empty then the the *.res file is converted to *.obj file

2.Assembles the first asm file and ALL modules (if any in your project). All these are converted to *.obj files

3.Links all *.obj files produced in 1 & 2 above.

If in 1 & 2 above two (or more) *.obj files with the same name have been produced, then you have the error message you describe. Your problem is easily solved if you rename the file(s) that causes the problem. e.g. if your first asm file is one.asm and your RC file is one.rc, you coulde rename your RC file to something else e.g. rsrc.rc

Please let me know if it helps,

Antonis
PMEmail PosterUsers Website
Top
iceberg
Quote Post


New Member
*

Group: Members
Posts: 7
Member No.: 70
Joined: 4-June 04


Sorry for asking such a silly question.The problem has been solved.Thanks!

Regards,

iceberg
PMEmail Poster
Top
JimG
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 727
Member No.: 11
Joined: 16-May 04


Hi Antonis-
QUOTE
1.If there is an *.RC file in your project, it is compiled to a *.res file. IF and only if, the command line in Project-Properties...-Resource-Res To Obj is not empty then the the *.res file is converted to *.obj file
When would you do this? The help file says nothing about this so some additional comments would be appreciated.

-Jim
PMEmail Poster
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2308
Member No.: 1
Joined: 12-May 04


You really need to convert a res file to an obj file if you want the obj file for your own needs (some googling will enlighten about the Common Object File Format) e.g. use a different linker that does not support res files. Most probably you will not need it-I never do!

Regards,

Antonis
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian