Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2020, 02:43 PM
Elysius
Sarnak
 
Join Date: Dec 2005
Posts: 43
Default Zone Compiling Error

Today I was trying to make some changes to my old server code, specifically to add Attack Delay that was put in back in 2014 (like I said, old). I backed up my zone folder in case things didn't work out, which they didn't as I assume there was some other update required to make the new code work. So I figured no problem, I'll just go back to my original code.

But ever since I did this, I can't compile anymore. Even with my code back to the way it was before. I keep getting this error:

Code:
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>------ Build started: Project: zone, Configuration: Debug Win32 ------
2>horse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall NPC::SetAttackTimer(void)" (?SetAttackTimer@NPC@@UAEXXZ)
2>merc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall NPC::SetAttackTimer(void)" (?SetAttackTimer@NPC@@UAEXXZ)
2>npc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall NPC::SetAttackTimer(void)" (?SetAttackTimer@NPC@@UAEXXZ)
2>pets.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall NPC::SetAttackTimer(void)" (?SetAttackTimer@NPC@@UAEXXZ)
2>C:\EQ\Source\Build\Bin\Debug\zone.exe : fatal error LNK1120: 1 unresolved externals
3>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
3>  Build all projects
========== Build: 2 succeeded, 1 failed, 9 up-to-date, 0 skipped ==========

Which is strange because the SetAttackTimer was what was being editted. But I've since replaced those edits with my original backed up code.
Reply With Quote
  #2  
Old 04-22-2020, 03:55 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Make sure that you do a Clean before attempting to Build.

Looks like the pre-compiled obj files still hold a reference to an external link that doesn't exist.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #3  
Old 04-22-2020, 04:30 PM
Elysius
Sarnak
 
Join Date: Dec 2005
Posts: 43
Default

Quote:
Originally Posted by Uleat View Post
Make sure that you do a Clean before attempting to Build.

Looks like the pre-compiled obj files still hold a reference to an external link that doesn't exist.
Thanks, that was it! My knowledge of this stuff is even more limited than I thought
Reply With Quote
  #4  
Old 04-22-2020, 05:33 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Quote:
Debug Win32
May want to select RelWithDebInfo as well.
Reply With Quote
  #5  
Old 04-23-2020, 03:41 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I should follow-up and say that you can 'usually' get away with performing a Build without having to do a Clean beforehand.

Any time that you alter or remove a pre-decl/hint like that, it's possible the compiler will not pick up the reference change in the obj file.

If the unresolved external symbol error pops up after a change on code that has previously compiled, a Clean would be my first recommendation.

If the Clean does not resolve it, then there is a linkage error that needs to be addressed.

Usually, the only real problem you'll see by not performing a Clean with every build is bin bloat (artificially increased size of bins.)

Rare occasions, you can actually get errors.

I use the Build-only method on my dev code until I'm happy with its performance .. then do a full Clean-Build to make sure everything is still ok.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3