svn: MSVC linker errors (Resolved)

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Purple Monkey
Rookie
Rookie
Posts: 22
Joined: 28 Aug 2006, 03:48

svn: MSVC linker errors (Resolved)

Post by Purple Monkey »

I'm having trouble compling the latest svn using VC++ 2005 Express.

Here's what I did:
  • Downloaded and extracted the DevPackage
  • Checked out the svn
  • Opened win32\Warzone2100.vcproj
  • Changed the __dvpkg__ with the path to the DevPackage in C++ & Linker
  • Added the paths to the platform SDK include/ and lib/ directories
  • Added " user32.lib advapi32.lib" To Linker->Input->Additional Dependencies
  • Added
    #define PACKAGE "warzone2100"
    #define LOCALEDIR ""
    to main.c (on line 79)
  • Removed "Ghost" files from file list (Any file that prodcued an error on opening)
  • Complied
I then got the following error:

Code: Select all

1>   Creating library D:\Coding\Projects\warzone\win32\Debug\Warzone2100-Dbg.lib and object D:\Coding\Projects\warzone\win32\Debug\Warzone2100-Dbg.exp
1>audio.obj : error LNK2019: unresolved external symbol _audio_GetIDFromStr referenced in function _audio_SetTrackVals
1>message.obj : error LNK2001: unresolved external symbol _audio_GetIDFromStr
1>stats.obj : error LNK2001: unresolved external symbol _audio_GetIDFromStr
1>D:\Coding\Projects\warzone\win32\Debug\Warzone2100-Dbg.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://d:\Coding\Projects\warzone\win32\Debug\BuildLog.htm"
1>Warzone2100 - 4 error(s), 2757 warning(s)
Any ideas what I missed?
Last edited by Purple Monkey on 17 Apr 2007, 01:17, edited 1 time in total.
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18

Re: svn: MSVC linker errors

Post by Giel »

Looking at the MSVC projectfile's revision log I see that besides removeing libmad from the linker list there have been no updates to the projectfile.

So you'd need to update your project file to compile lib/sound/audio_id.[c/h] into the sound lib. That should resolve the linker error your getting there, although there might be more linker errors awaiting, not sure though.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Purple Monkey
Rookie
Rookie
Posts: 22
Joined: 28 Aug 2006, 03:48

Re: svn: MSVC linker errors

Post by Purple Monkey »

Yep that was it, I guess all it needed was an update. Not been too experienced so I couldn't find a "rescan directories" function and so I guess I missed the fact files had been added.

Thanks.
You do not have the required permissions to view the files attached to this post.
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18

Re: svn: MSVC linker errors

Post by Giel »

Purple Monkey wrote: Yep that was it, I guess all it needed was an update. Not been too experienced so I couldn't find a "rescan directories" function and so I guess I missed the fact files had been added.

Thanks.
Thanks for the updated file, it is in SVN now (with slight modifications).
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh