Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old October 23, 2010, 01:20   #1
Kyle
Rookie
 
Kyle's Avatar
 
Join Date: Jul 2009
Posts: 15
Kyle is on a distinguished road
Issues compiling with MSVC++ 2008

I made a project file, added WINDOWS as a define, messed around with some file structuring so all the includes were found properly, but I'm getting link errors...

Code:
1>------ Build started: Project: ang311, Configuration: Debug Win32 ------
1>Linking...
1>birth.obj : error LNK2019: unresolved external symbol _modify_stat_value referenced in function _get_stats
1>calcs.obj : error LNK2001: unresolved external symbol _modify_stat_value
1>cmd-obj.obj : error LNK2001: unresolved external symbol _player_can_read
1>cmd-obj.obj : error LNK2001: unresolved external symbol _player_can_cast
1>cmd5.obj : error LNK2001: unresolved external symbol _player_can_cast
1>cmd-obj.obj : error LNK2001: unresolved external symbol _player_can_study
1>cmd5.obj : error LNK2001: unresolved external symbol _player_can_study
1>main-win.obj : error LNK2019: unresolved external symbol __imp__PlaySoundA@12 referenced in function _Term_xtra_win_sound
1>C:\Users\Kyle\Documents\Visual Studio 2008\Projects\ang311\Debug\ang311.exe : fatal error LNK1120: 5 unresolved externals
1>Build log was saved at "file://c:\Users\Kyle\Documents\Visual Studio 2008\Projects\ang311\ang311\Debug\BuildLog.htm"
1>ang311 - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any suggestions?

I also added winmm.lib as an additional dependency, since I noticed it was in Makefile.nmake.... still no improvements.

Last edited by Kyle; October 23, 2010 at 01:21. Reason: ....
Kyle is offline   Reply With Quote
Old October 23, 2010, 04:24   #2
Pete Mack
Veteran
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 2,399
Donated: $40
Pete Mack is on a distinguished road
I don't know about the SOUND stuffl; you can simply disable it in config.h
As far as the player_ things, that's because Visual Studio is terrible with duplicate file names. In this case, it's screwing up the inclusion of util.c in the player directory.
I've asked more than once to get the duplicate filenames removed (e.g. util-player.c, etc) with no luck.
Pete Mack is offline   Reply With Quote
Old October 23, 2010, 04:40   #3
ekolis
Knight
 
ekolis's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, OH, USA
Age: 31
Posts: 906
ekolis is on a distinguished road
Send a message via AIM to ekolis Send a message via MSN to ekolis Send a message via Yahoo to ekolis Send a message via Skype™ to ekolis
You should be able to go to the properties of player/util.c and set it to compile to a different object file name, such as player-util.obj rather than the default of util.obj...
__________________
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
ekolis is offline   Reply With Quote
Old October 23, 2010, 18:38   #4
Kyle
Rookie
 
Kyle's Avatar
 
Join Date: Jul 2009
Posts: 15
Kyle is on a distinguished road
OK. So util.obj is being craeted twice and then the first one is probably being overwritten?

Update: I renamed player/util.c to player/player-util.c

and that fixed all the problems except the
Quote:
main-win.obj : error LNK2019: unresolved external symbol __imp__PlaySoundA@12 referenced in function _Term_xtra_win_sound
If anyone has any knowledge on this I'd be super grateful. (I'm grateful already. )

Edit:
OK. So apparently I didn't save my changes when I included the dependency for winmm.lib

I put it in again and it compiled fine. Thanks the help!

Last edited by Kyle; October 23, 2010 at 18:47. Reason: Update
Kyle is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MSVC doesn't like identify.c ekolis Development 1 August 7, 2009 00:21
Problems compiling Vanilla Angband 3.1.0b in MSVC++ 2008 Express Kyle Development 2 July 26, 2009 07:09
Fundraiser 2008 pav Oook! 9 November 22, 2008 21:41
Compiling Issues Gregian Vanilla 13 July 2, 2008 14:35
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 15:49


All times are GMT +1. The time now is 01:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.