[ Tutorial ] Compile in Visual Studio 2010 Express

Home Forums Doom 3 [ Tutorial ] Compile in Visual Studio 2010 Express

This topic contains 2 replies, has 2 voices, and was last updated by  eTiTan 1 year, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #173

    eTiTan
    Member

    Well, it’s my first post to the community, i think make it special.

    From the very basic until the goal, compile successful the code ( https://github.com/TTimo/doom3.gpl distribution, until now this have more than 400 forks).

    Here are the steps:

    1. Download Visual Studio 2010.

    2. Download the DirectX SDK (june 2010).

    3. Download the source ( https://github.com/TTimo/doom3.gpl).

    4. Install the VC and the DXSDK.

    5. Uncompress the code were you want.

    That’s the easy part, now let’s go to the code:

    6. Open /doom3src/neo/doom.sln, the compiler told you that some errors for uncompatible folders, that does not matter.

    6.1 Erase this folders (dlls,exes,libs), don’t have worth.

    7. Go to DoomDLL Project -> right click -> Properties -> VC++ Directories -> left click over “Includes Directories” combobox and left click, , and paste ALL the address were yo have instaled the DXSDK (e.g. “C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include”), repeat for the “Library Directories” (e.g. C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86).

    REMEBER!!!, even you have windows 7 64 bits, everything should be 32 bits based code.

    8. Left Click on “doom” solution and click on “Build Solution” (Remember configure the build option to “Release”), Right? everything should be OK?, NO!!! some error appear…

    Let’s fix it…

    8.1 \neo\idlib\../tools/comafx/StdAfx.h(38): fatal error C1083: Cannot open include file: ‘afxwin.h’: No such file or directory, that CRAP!!!, this error is because VCExpress don’t come with the MFC Libraries, ok let’s put it…
    that’s some many poeple try, but no one can do it, well it’s the solution…

    8.2 Download that: http://www.mediafire.com/?szgoccextjhpig3

    8.3 Uncompress and paste the “altmfc” folder on “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC” or where you was installed the VCExpress, curiously, if you right click on “doom” solution and left click on “Debug Source Files” will see this folder was added much after you copy, as if it were “taked” before birth.

    OK, run well now? NO… some things still missing yet…

    8.4 sound\snd_system.cpp(167): error C2664: ‘ALenum (ALubyte *)’ : cannot convert parameter 1 from ‘const char [16]‘ to ‘ALubyte *’”

    Change the line 167 on [ sound\snd_system.cpp ]

    From this

    common->Printf( "%8d kB total OpenAL audio memory used\n", ( alGetInteger( alGetEnumValue( "AL_EAX_RAM_SIZE" ) ) - alGetInteger( alGetEnumValue( "AL_EAX_RAM_FREE" ) ) ) >> 10 );

    To this

    common->Printf( "%8d kB total OpenAL audio memory used\n", ( alGetInteger( alGetEnumValue( (ALubyte *) "AL_EAX_RAM_SIZE" ) ) - alGetInteger( alGetEnumValue( (ALubyte *) "AL_EAX_RAM_FREE" ) ) ) >> 10 );

    Only need a simple cast.

    Ok, until here, it’s should compiled fine, but can appear two more errors:

    - "TypeInfo.exe is returning -1" or "EXEC : FATAL error : Couldn't load default.cfg"
    Solution: copy the “base” folder is at the root of doom source code folder to “build/Win32/Release” folder created by the compiler, TypeInfo.exe need that for avoid errors.

    Look well…

    6> —— Initializing File System ——
    6> Current search path:
    6> C:\Users\Me\Desktop\id-Software-DOOM/base   <–  IMPORTANT!!!
    6> game DLL: 0×0 in pak: 0×0
    6> Addon pk4s:
    6> file system initialized.
    6> ————————————–
    6>EXEC : warning : idFileSystemLocal::StartBackgroundDownloadThread: failed
    6>EXEC : FATAL error : Couldn’t load default.cfg

     [ id-Software-DOOM ] Folder is where the compiler is lookin for default.cfg file, remember this…

    - Something About the LINKER
    warning MSB8012: TargetName(DoomDLL) does not match the Linker's OutputFile property value (DOOM3), only need to clean an build again the solution, that’s all.

    Well, it’s all about this theme now, i’ll make other post to say other things.

    • This topic was modified 1 year, 1 month ago by  eTiTan.
    • This topic was modified 1 year, 1 month ago by  eTiTan.
    • This topic was modified 1 year, 1 month ago by  eTiTan.
    • This topic was modified 1 year, 1 month ago by  eTiTan.
    #180

    shakes76
    Member

    Not so sure about step 8.2. You can follow what Eric and I posted in the bugzilla post at:
    https://bugzilla.icculus.org/show_bug.cgi?id=5290
    to disable the MFC parts of doom3, mainly the editor and other tools.

    Thanks for posting other parts, it was useful to me.

    • This reply was modified 1 year, 1 month ago by  shakes76. Reason: Link missing
    #182

    eTiTan
    Member

    The reason for this tutorial is to compile the code “as is” to enrich the pride of the programmer, who then will see how to do without the MFC shared library, taking into account that the tools and the editor will not work, it is important to point try in the bugzilla, as I am aware that the MFC library is not necessary for the running game, this is simply a new choice of one, is that when the code compiles fine, provided that all goes well, look for a way to do without the libraries.

    That is all … and thanks for the link to bugzilla.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.