Issues compiling with MSVC++ 2008

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kyle
    Rookie
    • Jul 2009
    • 15

    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, 01:21. Reason: ....
  • Pete Mack
    Prophet
    • Apr 2007
    • 6883

    #2
    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.

    Comment

    • ekolis
      Knight
      • Apr 2007
      • 921

      #3
      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!

      Comment

      • Kyle
        Rookie
        • Jul 2009
        • 15

        #4
        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
        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, 18:47. Reason: Update

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎