id Tech Forums

id Tech 4 (Doom3/Prey/Q4) => id Tech 4 Mod Coding => Topic started by: bitterman on August 10, 2015, 07:45:41 AM

Title: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 10, 2015, 07:45:41 AM
I have a laptop with windows 7 sp1, doom3.gpl source code (from TTimo, not BFG) and VS 2010 Express.

So on this config I can (and I do) build a doom3lite.exe (without MFC, ATL, DoomEdit, <Edit*> console commands etc).

In fact I build a release version w/o any inline tools.

But now I need build a "developer" verison with all inline stuff.

As I think it is possible in VS 2013 Community edition (with MFC, ATL etc).

So my questions:

1. It is possible?

2. Is VS2010E must uninstall before install VS2013CE?

3. Is laptop must have a internet access to install/registration/product key from VS2013CE.iso?
A key from installed VS2010E is valid?

4. Can I use /neo/doom.sln (perhaps for VS NET 2002) in VS2013CE or I must reconfigure it (make my own solution)? How to do this?

Thanks for any advise.

Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on August 10, 2015, 02:12:33 PM
I don't think I tried the stock code with Community but 2013 community (now 2015 if you have win 10) DOES build the tools with the modified code I tried.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 12, 2015, 12:21:46 AM
Ok, thanks.

My results is not impressive.

Yes, these IDE (2010e & 2013CE) can install together.

Yes, for 2013CE must have access to internet.
Yes, it have 30-days trial period and then need update (sign in with MS account).

Yes, it install/uninstall very long (~11 Gb).

Yes, it have "atlmfc" folder.

But no, I can't get original doom3.exe with tools.

I belive that dependences (MFC, ATL) in doom3.gpl are not so big.

But perhaps they are not compatible with new "atlmfc" or I compile it wrong.
(many syntax and other errors in afx* files).

I tried VS2013CE and both method for 2010e (with "altmfc" folder and with WinDDK "atl" "mfc42").
(http://www.moddb.com/company/apgsoftware/tutorials/how-to-compile-doom-3-with-visual-studio-2010 (http://www.moddb.com/company/apgsoftware/tutorials/how-to-compile-doom-3-with-visual-studio-2010))

I also try (don't ask me why) MBCS (MS multybyte lib) - it's a scary thing and I don't understand it :)

Now I'm very unhappy :(
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on August 12, 2015, 07:19:33 AM
I got the error
Quote
Error    322    error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xkeycheck.h    250    1    Game

That's one I'm not familiar with, but it's the only error I got.

Not sure how to deal with that one.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 12, 2015, 10:58:09 AM
Is this stock source code?
Some additional options?
Can you describe build process please?
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on August 12, 2015, 07:21:25 PM
I downloaded the stock code to my machine, loaded up Community 2013, loaded the SLN, let it convert & then compiled.

I want to point out that I have the edition that lets me compile Windows 8/Phone apps & also have the DX9 SDK installed. 
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 12, 2015, 10:04:57 PM
Thanks, Obi-Wan Kenobi. You're my only hope :)

***************************

Some "atl..." and "MBCS..." problems.

Why debug files are linked with VC 10?


****************************

Ok, I see missed include files in C:\Program Files (x86)\Windows Kits\8.0 and C:...\Microsoft SDKs'Windows\v7.0A\Include.

Try to add this path in Properties->VC++ directories->Include
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 13, 2015, 11:25:39 AM
Still don't work...

Title: [Solved] Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 16, 2015, 09:12:33 AM
Ok, I'm install vs2013ce w/o internet access and preinstalled WinSDK, so some registry variables and VC++ directories (e.g. WindowsSDKdir, _include) was incorrect.

And looks like manual fix can't resolve this problem.
Try to "Repair" option.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 18, 2015, 08:48:06 AM
Ok, now I'm get only few errors.

"LINK1181: cannot open input file "nafxcw.lib".

But I can't find "nafxcw.lib" on my disk.

As I see this problem is still related with MFC version (_DEBUG or _UNICODE define).

afx.h:

Code: [Select]
#ifndef _UNICODE

#ifdef _DEBUG

#pragma comment(lib, "nafxcwd.lib")

#else

#pragma comment(lib, "nafxcw.lib")

#endif

#else

#ifdef _DEBUG

#pragma comment(lib, "uafxcwd.lib")

#else

#pragma comment(lib, "uafxcw.lib")

#endif

#endif

In DoomDLL -> Properties -> General I see options "Character Set", "Use of MFC", "Platform Toolset" and others.

The options set by default, and I don't sure about any changes.

The Happy Friar can you show me a printscreen of "DoomDLL Property Pages" (RMB on "DoomDLL" in Solution Explorer then "Properties") -> "Configuration Properties" (General and VC++ Directories as I think) please?


Ok, don't worry.

*******************************************

Quote
In Visual Studio 2013 and later, the MBCS versions of the MFC DLLs are available as a free add-in to Visual Studio from the MSDN download site. For more information, see MFC MBCS DLL Add-in.

https://msdn.microsoft.com/en-us/library/ey142t48%28v=vs.120%29.aspx (https://msdn.microsoft.com/en-us/library/ey142t48%28v=vs.120%29.aspx)

https://www.microsoft.com/en-us/download/details.aspx?id=40770 (https://www.microsoft.com/en-us/download/details.aspx?id=40770)

http://wiki.openttd.org/Compiling_on_Windows_using_Microsoft_Visual_C++_2012 (http://wiki.openttd.org/Compiling_on_Windows_using_Microsoft_Visual_C++_2012)
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 21, 2015, 08:36:33 AM
Done!

I'm happy almost like Friar (thanks!) :)

A important option is "Properties -> General -> Platform Toolset"
(it must be v120_xp for WindowsXP and v120 for Windows 7, there is a deal with DX SDK version).

Quote
====== Build: 4 succeeded, 0 failed, 0 up-to-date, 0 skipped =========

0 errors, ~173 warnings (most about MBCS deprecated).

 :) :) :)



Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: motorsep on August 21, 2015, 09:13:07 AM
Good job!

Now you just need to write a tutorial about that ;)
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on August 22, 2015, 10:13:05 AM
Well, all as say The Happy Friar except mbcs add-in (see links above).
Other things are my mistakes by incorrect installation MSVC.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on February 25, 2016, 07:20:53 PM
Bringing the topic back from the dead!  :)

MSVC Community 2015 wants to give me errors saying "S_COLOR_RED" & "SOURCE_CODE_BASE_FOLDER" not found.  They're defined in str.h & license.h, respectively.  Both headers are included but don't seem to be read.  Has anyone else tried the GPL code (not a fork, want to tools to compile) in Community 2015?
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on February 25, 2016, 08:20:51 PM
Well, I just tried adding a space in the line.
Was
Code: [Select]
idLib::common->Printf( "   simd->Memset() "S_COLOR_RED"X\n" );changed to
Code: [Select]
idLib::common->Printf( "   simd->Memset() " S_COLOR_RED"X\n" );it eliminated the errors related to s_color_red & source_code_base_folder.  Go figure. :?
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on February 25, 2016, 10:42:53 PM
getting a little farther with 2015 community... in addition to "math.h" header, you also need to include "cmath".  Some things were moved there in 2015 vs 13.

Now I'm having
Code: [Select]
"Severity    Code    Description    Project    File    Line    Suppression State
Error    C2039    '_file': is not a member of '_iobuf'    TypeInfo    G:\doom3.gpl-master\neo\framework\FileSystem.cpp    3644   
"
error.  :/  Looking online says  2015 changed the file IO stuff for some reason.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on February 26, 2016, 01:42:52 AM
Not related question - do I need a MBCS package to compile D3 with MSVC2015CE?
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on February 26, 2016, 06:56:02 AM
I think I installed that, forget atm.  I installed most options.

Still can't get it to compile in 2015 CE.  It's because they changed header files between 2013 & 15 (Win 8.1/10) SDK.  I'm thinking that if I installed 2013 CE first, then 15, I would of had the original SDK & I would of been ok.  Ugh, I don't want to download & install 2013 & then 2015 again.  :p
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: kat on July 07, 2016, 02:00:24 PM
Sorry for the necrobump but this is literally the only topic on the entire Internet that speaks in plain tongue about compile issues with source. Anywho just kind of throwing this information out there to see if any of you chaps know what's what...

Compiling Doom3GPL (Ttimo) the following crops up; the source files as provided seem like they able to compile in Visual Studio 2013 so long as the MFC pack linked in an earlier post is loaded (if not the LNK errors occur (http://idtechforums.fuzzylogicinc.com/index.php?topic=284.msg2810#msg2810)) with the exception of this error in "xkeycheck.h" line 250; "324 error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to fine the forbidden macro".  There is some info floating around the Internet on this but it's not clear how it's used (won't link to the sites as they all seem to be traffic harvesters). Has anyone figured out a fix for this.

Second issue. Compiling the same source code with Visual Studio 2015 throws up a lot of errors (between 30 and 60 depending on how messed up the code gets after changing things around), some of which are discussed in some of the earlier posts in this topic, and again they seem to relate mainly to making sure the MFC language library's and SDK's are installed.

The "S_COLOR_RED" error crops up and can be fixed as per Friar's post (http://idtechforums.fuzzylogicinc.com/index.php?topic=284.msg4060#msg4060), but the "SOURCE_CODE_BASE_FOLDER" persists. In the *.h file that's listed as "../"SOURCE_[...]" which is supposed to be referencing "/neo", the source code folder. But what is that path relative to, the "[drive]:\" location? Should it be "../../"SOURCE[...]" or "/"SOURCE[...]" indicating a different local relative to VS? In other words, the relative path to the source files is wrong so it throws up the error.

With regards to "math.h" versus "cmath" and VS 2015, the default code doesn't use cmath and that seems like a big task to correct, but reading up on the "abs" errors thrown up it appears Doom 3 source should be using "fabs" because the code is using 'floating variables' (which seems to be what 2015 is expecting). Using "fabs" doesn't fix the problem as might be expected though. So not sure what's going on there.

As an incidental side note: the instructions on the ModdDB page are confusing a hell and a lot of it seems to cause more problems than it solves for 2013 and 2015 (can't speak for 2010) - if those are installed correctly there's no need to add the absolute paths to VC and/or DirectX SDK etc., because VStudio is supposed to pull that info in automatically from system paths.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: kat on July 07, 2016, 02:55:18 PM
O....M....G sorted. To solve the xkeyword.h error right-click "Game" select "Properties". In "Configuration Properties" expand "C/C++" and select "Preprocessor". Select "Preprocessor Definiations" and add "_XKEYCHECK_H;" between "NDEBUD;" and "%(PreprocessorDefinitions)";

Code: [Select]
NDEBUD;_XKEYCHECK_H;%(PreprocessorDefinitions)P.S. wrote instructions up here (https://www.katsbits.com/smforum/index.php?topic=896.0)
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: bitterman on July 07, 2016, 09:52:33 PM
kat

Hi! Are you that guy from katsbits?

Great site, indeed.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: kat on July 07, 2016, 11:26:15 PM
Yes, tiz I.  ;D
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on June 18, 2017, 09:04:18 PM
Ok, I forgot what I did to fix the C2039 error for the file is not a member of thing.  Anyone remember?  I didn't post in this thread.  I'm trying to compile in MSVC Community 2017.  :)

This is still the ONLY thread on the internet that address these issues.  :)
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: kat on June 18, 2017, 10:42:27 PM
What's the full error "C2039: Class is not a member of Namespace" or similar? Most resources suggest something is missing or there's a circular logic going on - file A refs file B, file B refs file A.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on June 19, 2017, 11:14:59 AM
Yeah, same error I'm having in the post above ( http://idtechforums.fuzzylogicinc.com/index.php?topic=284.msg4062#msg4062 )

I just don't remember what I did to eliminate it.
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: kat on June 19, 2017, 02:42:18 PM
Don't know if this helps but if you look at _iobuf at line 3644(?) does it list _file as a property or function? If it does, that error appears to point to an undeclared association somewhere, so you'll likely need to add "_file" to something or remove it.

If you figure it out remember to write up what you did this time! lol
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on June 20, 2017, 09:57:18 PM
hovering my mouse pointer over "_file" in the offending line I get the popup that says "class '_iobuf' has no member '_file'".

Where's _iobuf?  A header perhaps?
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: kat on June 20, 2017, 10:23:59 PM
The error refers to it as a "class" so it'll likely be declared in a file rather than being one. The "io" part looks to be input/output. Can't say much beyond that unfortunately as I'm not running the same specs as you so likely not seeing exactly the same data (a quick source search didn't ping anything up for me).
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on June 20, 2017, 10:47:16 PM
This is the same GPL stock code I've compiled in MS Community 2013 & 15.  I looked online and all I could find was that after Community 2013 some headers changed.  Which is what I said a while ago. 

Maybe I did just go back to Community 2013.  I forget.  :)
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: kat on June 20, 2017, 11:08:35 PM
Yeah at a guess something else is being done with the switch to 2017 that's not being properly declared. If there wasn't a specific reason for upgrading to 2017 I'd agree on using 13 or 15, at least that way you know there isn't necessarily a core source issue..
Title: Re: Doom3.gpl (TTimo) and VS 2013.5 community edition
Post by: The Happy Friar on June 21, 2017, 02:03:18 PM
I've found a couple references on the internet about _iobuf being changed between the 2013 & 2015 editions.  There seems to be two solutions: 1) take the relavent parts of the 2013 & older header file & put them in the new header files, or 2) rewrite the code so it doesn't use that pointer.  #2 is beyond me atm.