Compiling Quake Engine with VC++ Express?

Post tutorials on how to do certain tasks within game or engine code here.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Compiling Quake Engine with VC++ Express?

Post by Quake Matt »

Just wondering if anybody knows how to, or if it's even possible? I'm familiar(ish) with the interface, so I'd like to stick to using it if at all possible. The closest bit of info I've found is how to get it running under VC++ 6.0, but steps seem to differ.

If it helps any, it's Arqlite that I'm trying to compile for now - keeping it simple!

Thanks in advance!

Edit: Okay, kinda false alarm. It appears that I'm not allowed to call my projects directory "C++ Projects" - spaces make things go wrong! I'm making progress now and I've just got to finish downloading the Platform SDK before I can go any further.
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

I thought Quake engine code was in C# not C++? If so wouldn't you use Visual C# 2005 Express Edition then?
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

I thought Quake engine code was in C# not C++? If so wouldn't you use Visual C# 2005 Express Edition then?
Shirley, you must be joking.

To paraphrase a legend in engineering, Montgomery Scott: "Quake source is in C. No bloody plus, hash or star."
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

It's also bits of assembly.
i should not be here
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

I always thought it was written in JavaScript.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

So I guess thats a yes? :roll: :D
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

I'm not a programmer by any means, but I could get Visual C++ 2005 Express Edition to import and convert the latest DarkPlaces source... It did compile as well with no modification, but I must be missing header files because I got a lot of missing file errors like: "fatal error C1083: Cannot open include file: 'windows.h': No such file or directory"

I seem to remember this before when I messed with the Quake engine code and the QER tut's back in the day... I must need to add the missing files from some where...

I did try doing this in Visual C# 2005 Express Edition, but it wasn't having it... :roll:
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

windows.h huh? The express editions may not come with the (freely available) Platform SDK (Visual C++ 6.0 installs with an older version of the SDK, which is sufficient for Quake). you'll also need the DirectX SDK installed as well, I'm not 100% certain the headers provided with the Quake source are sufficient.

Regardless, C# language support is not required. Quake and all it's utilities are in C, any good C++ compiler can handle it.
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

I guess it didn't, but I did find the headers in an old LCC installation I had stored away. In the case of compiling Darkplaces source I failed with the following warnings and an error toward the bottom when compiling filematch.c:

c:\program files\microsoft visual studio 8\vc\include\win.h(7) : warning C4005: 'FALSE' : macro redefinition
d:\games\quake\quake\darkplacesenginesource20061115beta1\darkplaces\qtypes.h(23) : see previous definition of 'FALSE'
c:\program files\microsoft visual studio 8\vc\include\win.h(8) : warning C4005: 'TRUE' : macro redefinition
d:\games\quake\quake\darkplacesenginesource20061115beta1\darkplaces\qtypes.h(24) : see previous definition of 'TRUE'
c:\program files\microsoft visual studio 8\vc\include\basetsd.h(17) : warning C4005: '_W64' : macro redefinition
c:\program files\microsoft visual studio 8\vc\include\sys\types.h(29) : see previous definition of '_W64'
c:\program files\microsoft visual studio 8\vc\include\io.h(306) : warning C4142: benign redefinition of type
c:\program files\microsoft visual studio 8\vc\include\io.h(306) : error C2375: 'get_osfhandle' : redefinition; different linkage
c:\program files\microsoft visual studio 8\vc\include\win.h(14201) : see declaration of 'get_osfhandle'


So what I'm thinking is that with quake the older header files might be ok, but with DarkPlaces the impact might be a bit more important?
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

xaGe wrote:I guess it didn't, but I did find the headers in an old LCC installation I had stored away. In the case of compiling Darkplaces source I failed with the following warnings and an error toward the bottom when compiling filematch.c:
Why not just use the Microsoft headers? It seems completely illogical to use a Microsoft compiler but not use the Microsoft headers.
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Post by Error »

FrikaC wrote:Shirley, you must be joking.
No I'm not joking... and stop calling me Shirley.
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

The official platform SDK doesn't even come with a file called win.h nor anything that defines the macros FALSE, TRUE or the function get_osfhandle. I don't know why the LCC headers define them or if DarkPlaces can compile under LCC - but I'd go with the tried and true and use the Microsoft Platform SDK.
xaGe
Posts: 465
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York
Contact:

Post by xaGe »

Yeah thanks FrikaC I shall do that when I have the time. I only did this on a whim after reading this thread... :)
FrikaC wrote:The official platform SDK doesn't even come with a file called win.h nor anything that defines the macros FALSE, TRUE or the function get_osfhandle. I don't know why the LCC headers define them or if DarkPlaces can compile under LCC - but I'd go with the tried and true and use the Microsoft Platform SDK.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

Installing the PSDK seems to have fixed my first problem - a missing afxres.h file. Handy.

Still can't get it to compile, though! The .rc file's the cause now, where it wants the language to be given as an ID number, rather than LANG_ENGLISH. Google couldn't really help me, so I tried some hex codes I found and got a bit further, still with errors though:

Code: Select all

cl_demo.obj : warning LNK4229: invalid directive '/opt:nowin98' encountered; ignored
cl_demo.obj : warning LNK4229: invalid directive '/ignore:4078' encountered; ignored
(repeat the above about 50 times...)
cl_demo.obj : warning LNK4254: section '.text' (60000020) merged into '.data' (C0000040) with different attributes
LINK : fatal error LNK1272: cannot merge '.reloc' with any section
Any ideas on what's happening?
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

After installing the PSDK and changing any project options, be sure to run a clean build. IE the Rebuild All menu option.
Post Reply