~ Forums of Enroth ~

An Enroth diehard fan community
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» HoMM I: Misty Islands by Huntka
by Uhm 2018-07-20, 21:39

» [Ironfist 1.3.0] Bug with the OnTownOpen callback
by DarkAtom 2018-07-19, 21:56

» I'm looking for one really crazy map to H2
by Unknown_Hero 2018-07-18, 01:53

» H1 Masquerade by Morglin
by Pitsu 2018-07-17, 06:28

» H3SW Recruitment Point - Enroth Needs You!
by MaXenaeL 2018-07-14, 02:00

» Хочу сделать коллаж по любимой игре
by Stryker34RUS 2018-07-11, 03:19

» Advanced Dialogue Boxes in Project Ironfist
by DarkAtom 2018-07-03, 04:32

"Wait" in HoMM2?
 80% [ 55 ]
 20% [ 14 ]
Total Votes : 69
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
H3SW Map List: Work in progress
Enrothian Fan Art
Welcome fellow Enrothians!
Dervish Faction General Concept
H3SW Recruitment Point - Enroth Needs You!

Share | 

 LNK2001 Error

Go down 

PostSubject: LNK2001 Error   2015-07-21, 04:54

I'm trying to modify game method ( army::DoAttack(int) ).
Added this to heroes2_imports.inc:

IMPORT_?DoAttack@army@@QAEXH@Z = 1
?DoAttack@army@@QAEXH@Z_clone EQU ?DoAttack_orig@army@@QAEXH@Z
And modified combat.h and combat.cpp files:
combat.h - added void DoAttack(int) and void DoAttack_orig(int) declarations to army class.
combat.cpp - added void army::DoAttack(int x) definition.
The problem is when I call DoAttack_orig(x), linker give me an error.
PS, sorry for my english, it isn't my native language Smile


Admin's edit: An additional post by DraggonFantasy was omitted when copying from the old forum, and has been inserted here:

DraggonFantasy' post:

Problem fixed. I deleted heroes2.obj file to perform reassembling and everything works now. Very Happy
Back to top Go down

PostSubject: Re: LNK2001 Error   2015-07-21, 04:55

Excellent! May I ask what you're modding?

I've been a bit lax lately about uploading the latest versions of the source code. I need to get on that.
Back to top Go down

PostSubject: Re: LNK2001 Error   2015-07-21, 04:55

I'm making a mod, that extends map-making abilities, adds more Lua functions and triggers etc.
Have already added 16 new functions and 3 new triggers Very Happy
Also fixed the bug with Pandora's Box, when it replace your army with peasants after battle)
Back to top Go down

PostSubject: Re: LNK2001 Error   2015-07-21, 04:56


I've been trying to get the game to compile, but seem to be missing a few steps. Could you share what you did/programs you used to make it work? I gave Darmani a ping but he's pretty busy atm so if you could help that would be great. Very Happy

steps I've taken so far (working on a Windows 7 machine):
(1) install Visual studio Express C++ 2010 (I usually develop in Eclipse, and that one was free)
(2) fetch latest from the Mercurial repo and open the VC project (.vcproj file)
(3) compile failed on some include failure
--> fixed by adding (path to to ironfist repo)/ironfist/src/cpp and (...)/ironfist/src/cpp/lib to include path
(4) Compile failed on error "'CString' : undeclared identifier" in file dialog.cpp
--> guess my includes aren't 100% correct yet... quick workaround: comment the code
(5) massive syntax errors on everything in the xerxes folder
--> stuck here... more include issues? Maybe I don't have correct libraries installed?
Back to top Go down

PostSubject: Re: LNK2001 Error   2015-07-21, 04:56

never mind Smile had some more help and fixed all the issues Smile
Back to top Go down
Sponsored content

PostSubject: Re: LNK2001 Error   

Back to top Go down
LNK2001 Error
Back to top 
Page 1 of 1
 Similar topics
» browser error occured [Error #230]
» Error Code #230 - it's BACK!!
» Error Code 64: Host not available!
» PSN Error 80710B36?
» PSN DNS Error Fix

Permissions in this forum:You cannot reply to topics in this forum
~ Forums of Enroth ~ :: Modding Guild :: Heroes of Might and Magic II: Project Ironfist :: Modding and Mapmaking-
Jump to: