Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Apr 2010
    Location
    the interwebz
    Posts
    107

    Default Compiling SVN snapshot (as-is)

    STATUS: Solved[ish]

    Problems / Solutions:

    Problem: WindowsResources.rc referenced nonexistent include file 'afxres.h'
    -Solution: change 'afxres.h' to 'winres.h' (you may need to instead change it to 'mfc\winres.h')
    Problem: Installed Windows SDK (Server 2008)
    -Solution: roll back to Microsoft Platform SDK (Server 2003)
    Problem: C2733: Illegal second linkage in 2 functions in 'winnt.h'
    -Solution: add 'volatile' keyword to all args of both functions in 'winnt.h'
    Problem: LNK1104: cannot open file verstub.obj
    -Solution: verstub.obj was appearing as 'C:\documents.obj' due to lack of quotes, moved to proper directory and renamed.

    ---- Original Post ----

    I have downloaded the source and (more recent versions) of the software required to compile it.

    I have:
    Visual C++ Express 2010
    DirectX SDK (Summer 2004)
    Windows SDK (for Server 2008 and others) (in place of Platform SDK)

    Quote Originally Posted by VC++ 2010 build log
    3> archutils\Win32\WindowsResources.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.
    The build goes well until it gets to 'archutils\Win32\WindowsResources.rc', at which point it fails due to an nonexistent include file 'afxres.h' . I have googled around, and this seems to be a problem with the Platform SDK, but the solutions I found didn't seem applicable to the Windows SDK. Has anyone else managed to do it on VC++ 2010, and did you also run into this issue? Did you manage to fix it?

    I am currently uninstalling the Windows SDK and downloading and installing the recommended version (Microsoft Platform SDK for Server 2003).
    Last edited by wug; 06-03-2010 at 02:48 AM.

  2. #2

    Default

    I ran into the same problem. Turns out you must edit WindowsResources.rc so that it instead asks for "winres.h" instead of "afxres.h"

    rather annoying, once I had finally found the file and it turned out to be 64bit only.


    Try it! It's Good.

  3. #3
    Member
    Join Date
    Apr 2010
    Location
    the interwebz
    Posts
    107

    Default

    [SOLVED]

    OK, I resolved that and have since run into a new problem.
    Quote Originally Posted by VC++ 2010 build log
    1>c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(2645): error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
    I get 2 of these, and there aren't any duplicates - for some reason this function and one more are seen twice. the other function this happens to is '_interlockedbittestandreset'.

    edit------
    if I comment it out, it compiles further (and then runs into a problem somewhere else.... ugh)

    edit 2-----
    solved by modifying the winnt.h (added 'volatile' keyword to the argument types of both arguments of both functions)
    Last edited by wug; 06-03-2010 at 02:14 AM.

  4. #4
    Member
    Join Date
    Apr 2010
    Location
    the interwebz
    Posts
    107

    Default

    [SOLVED]

    A new problem has appeared.

    Quote Originally Posted by VC++ 2010 build log
    1>cl : Command line warning D9024: unrecognized source file type 'and', object file assumed
    1>cl : Command line warning D9027: source file 'and' ignored
    1>cl : Command line warning D9024: unrecognized source file type 'Settings\Wug\stepmania\src\build-StepMania-net2010\StepMania\Debug\', object file assumed
    1>cl : Command line warning D9027: source file 'Settings\Wug\stepmania\src\build-StepMania-net2010\StepMania\Debug\' ignored
    1> verstub.cpp
    1>LINK : fatal error LNK1104: cannot open file 'C:\Documents and Settings\Wug\stepmania\src\build-StepMania-net2010\StepMania\Debug\verstub.obj'
    The final line is the error itself. The other information is (I believe) a build configuration warning that may or may not be related.

    I have a feeling that cl.exe is recieving via command line a directory, but that it is not in quotes. ('C:\documents and settings\...' has spaces)

    Upon inspection of that directory, verstub.obj is not present (though many other objs are)

    edit --
    I hacked a solution. the lack of quotes was making the missing object file appear as 'C:\documents.obj'. I renamed it to 'verstub.obj' and moved it to the proper directory and rebuilt and it built completely.
    Last edited by wug; 06-03-2010 at 02:46 AM.

  5. #5
    Member
    Join Date
    Apr 2010
    Location
    the interwebz
    Posts
    107

    Default

    Update:
    Lol, after all that, the svn snapshot doesn't even work.
    It fails to properly load and cache songs, crashing randomly due to taking substrings from out of range indices.

  6. #6
    Super Moderator
    Join Date
    Nov 2006
    Posts
    3,490

    Default

    Of course, that may be due to the hacks you had to make to get it working. It also could be unrelated. Could you report the bugs?

  7. #7
    Member
    Join Date
    Apr 2010
    Location
    the interwebz
    Posts
    107

    Default

    nope, its not the hacks. I reverted to the original snapshot without all of my fun mods and it still had the same problem. The issue seems to live in the DWI loader (I think) because songs with only SMs do seem to load.
    Sure, I will report them, as soon as I isolate them in the original snapshot. It's not particularly difficult, I just run it with songs and it fails.
    On a related note, I can now successfully control the cache location through the ini file.
    Finally, to whom do I humbly beg for write access to SVN?

  8. #8
    about 20% cooler shakesoda's Avatar
    Join Date
    Jun 2007
    Location
    Seattle, WA
    Posts
    6,886

    Default

    Quote Originally Posted by wug View Post
    nope, its not the hacks. I reverted to the original snapshot without all of my fun mods and it still had the same problem. The issue seems to live in the DWI loader (I think) because songs with only SMs do seem to load.
    Sure, I will report them, as soon as I isolate them in the original snapshot. It's not particularly difficult, I just run it with songs and it fails.
    On a related note, I can now successfully control the cache location through the ini file.
    Finally, to whom do I humbly beg for write access to SVN?
    You need to email Chris about it. If you have patches I'd be glad to review them.
    < shakesoda> I have altered the subject
    < shakesoda> pray I do not alter it further

  9. #9
    Member
    Join Date
    Apr 2010
    Location
    the interwebz
    Posts
    107

    Default

    For whatever reason, the DWI loader errors only occur if compiled with debug configuration, I compiled it with release config and the errors disappeared.

  10. #10
    Member
    Join Date
    Apr 2010
    Location
    the interwebz
    Posts
    107

    Default

    Also, here are the files I modified.

    -The arch hooks were modified not to mount the cache in MountUserFilesystems(...) because the cache is now explicitly mounted in stepmania.cpp, right after the preferences are loaded.

    -PrefsManager was modified to include a 'CacheFolder' directive, which defaults to '/Cache' (or 'T:/Cache' if compiled for xbox) if missing OR blank

    -SpecialFiles was modified: I changed the CACHE_DIR to '/SMCache' to prevent an odd behavior of the rage file drivers (wherein if (and only if) the old cache directory exists, it would be used regardless of the cachefolder directive)

    -StepMania was modified to explicitly mount the cache after loading preferences and to fall back to default value if it failed)

    edit----
    DOWNLOAD MODIFIED FILES
    Last edited by wug; 06-04-2010 at 09:21 PM.

Similar Threads

  1. Need help compiling 3.9 on Ubuntu 9.10
    By KcLKcL in forum StepMania releases
    Replies: 8
    Last Post: 12-17-2009, 04:23 PM
  2. 4.0 SVN compiling error
    By guardiase in forum General questions
    Replies: 0
    Last Post: 01-05-2009, 07:12 PM
  3. linux compiling help
    By pxrage in forum General questions
    Replies: 0
    Last Post: 07-12-2008, 03:36 PM
  4. Problem with compiling SM
    By -JS- in forum General questions
    Replies: 3
    Last Post: 05-06-2008, 10:14 PM
  5. Compiling 3.9 on Windows: SDL?
    By Spy47 in forum General questions
    Replies: 1
    Last Post: 12-16-2006, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Thanks to

SourceForge.net Logo