Compiling RF with Visual C++ 2005 Express

Programming Reality Factory and Genesis3D.
User avatar
BYS
Posts: 10
Joined: Sun Jan 07, 2007 5:53 pm
Location: Germany
Contact:

Compiling RF with Visual C++ 2005 Express

Post by BYS »

I´ve got an Problem and already searched all posts...

I have Installed the directX sdk and the Platform SDK (and of course VC 2005E) and they work fine. But I don't know how to set up the Project, that means: the depencies, the build order and which Projects I have to compile. I always get errors like: genesis.h or vec3d not found.

pre-thanks BYS
I hope I dont make too many mistakes in my posts...
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

There's a section about compiling RF with MS VC++ 6 in the docs. Setting up MS VC++ 2005 is pretty much the same:

Step 1 Download the necessary files.
You'll need to get the following files:

DirectX9 Headers and Libraries (Note: Microsoft DirectX9c does not support MS VC++ 6 anymore, you need an older version)
Genesis3D Headers and Libraries
Reality Factory Source files

Step 2 Install the necessary files.
First, install the Reality Factory source. The default directory is C:\RealityFactory\source. Under that directory are some subdirectories:

hashtable - hashtable utility
HawkNL - The network code
ode39_win32 - Physics SDK (not currently used)
Qx - Lucas Ackerman and Jeff Thelen's Skydome code
Simkin - The scripting code, comes from http://www.simkin.co.uk
Next install the Genesis_02052007.zip file on your system. This file includes the Genesis3D headers and libs, and also includes the decrypt, freeimage, joystick, ogg and vorbis libs. Unzipping this file should create a directory under your Reality Factory directory (at the same level as the source directory) called Genesis_02052007, under which are:

Include - The '.h' files for the underlying Genesis3D rendering engine RF is a 'wrapper' for

Lib - 'library' files for Genesis3D, and also Joystick.lib, ogg.lib, vorbis.lib, freeimage.lib, decrypt.lib

Finally, install the DirectX libs. A DirectX directory is created containing the DirectX library Genesis3D uses. DirectX is a standard for graphics that Microsoft operating system computers use. Note the directory that they are installed to, as you will need this information later.

Step 3 Set up Microsoft Visual C++
MS Visual C++ must be setup to make use of the files we have just installed. Since each project cannot have its own directory paths to search for headers and libs we must setup Visual C++ to always search the proper directories. This is done as follows:

Microsoft VC++ 2005
Open the project by double clicking on 'realityfactory.vcproj'.

Go to Tools->Options...
In the tree view click on Projects and Solutions and then on VC++ Directories

From the Show directories for box choose the Include files entry.
Double click on the rectangular box at the bottom of the list
Type in (or browse to) the directory location of the Genesis3D headers.
Again, double click on the rectangular box at the bottom of the list.
Type in (or browse to) the directory location of the DirectX headers.
Use the up arrow button at the top of the directory list to move these directory locations to the top of the list.

From the Show directories for box choose the Library files entry.
Double click on the rectangular box at the bottom of the list
Type in (or browse to) the directory location of the Genesis3D libs.
Again, double click on the rectangular box at the bottom of the list.
Type in (or browse to) the directory location of the DirectX libs.
Use the up arrow button at the top of the directory list to move these directory locations to the top of the list.
Close the dialog by pressing the OK button at the bottom.

Step 4 Building the EXE.
Microsoft Visual C++ is now ready to compile the Reality Factory source. It is important that no directory be above the DirectX and Genesis3D lib and header directory location in the list that may contain other versions of those libs and headers. This can happen if you have installed another Genesis3D-based project. Reality Factory uses a modified version of the Genesis3D engine and only those modified headers and libs will allow the project to be compiled. Since the directories in the list are searched from top to bottom, the Reality Factory directories should be at the top of the list to avoid problems.

Pull down "Rebuild All" from the Build menu. In a few minutes, if successful, you will have a new realityfactory.exe file in your Reality Factory directory.

Warning: If you're using your main game directory, rename or put a copy of your WORKING realityfactory.exe somewhere as it will get deleted when the compiler starts building the new one.
User avatar
BYS
Posts: 10
Joined: Sun Jan 07, 2007 5:53 pm
Location: Germany
Contact:

Post by BYS »

Ahh, it worked!
I´m so stupid! I include the whole Genesis dir! :oops:
Thank you sooooo much!
I hope I dont make too many mistakes in my posts...
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

"www.simkin.co.uk" Doesn't seem to exist. There so many things called simkin on the net that when I search for it I got wat to many results to go through.

I have searched for a very long time for "DirectX9 Headers and Libraries" and got nothing but confused.

"Genesis3D Headers and Libraries" Don't seem to be for DL on the Genesis3D site.

"Reality Factory Source files" I have thoes.

Where can one get: DirectX9 Headers and Libraries, Genesis3D Headers and Libraries, and the Simkin scripting code?
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

"www.simkin.co.uk" Doesn't seem to exist. There so many things called simkin on the net that when I search for it I got wat to many results to go through.
The address is correct and the link in my post above works fine, however the simkin source is included in the RF source package, so you don't have to visit that site
I have searched for a very long time for "DirectX9 Headers and Libraries" and got nothing but confused.
The latest DirectX SDK:
http://www.microsoft.com/downloads/deta ... layLang=en
"Genesis3D Headers and Libraries" Don't seem to be for DL on the Genesis3D site.
Genesis3D source:
https://github.com/RealityFactory/Genesis3D
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Post by paradoxnj »

The November DX SDK will not include DirectPlay anymore which Genesis uses:

(From Microsoft.com)
Last Release of the DirectX SDK That Will Contain ....

This is the final release of the DirectX SDK that will contain the following components:



Direct3D8 and all of the earlier versions

Direct3D RM

DirectAnimation

DirectMusic

DirectInput7 and all of the earlier versions

DirectPlay

DirectPlayVoice

DirectX8-era HRESULT conversion routines

Managed DirectX samples and documentation

The next release of the DirectX SDK will not contain these components. Once the November 2007 DirectX SDK is released, developers wanting to use these components will need to download the August 2007 DirectX SDK, available from MSDN.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

Thanks for the information will come in very handy.

I really need the fix for the MovingPlatform issue where the player falls through when the try to ride it.

I am going to try to take the fix that QOD gave and compile it myself.

Not sure how this will work. I am no programmer. I have Microsoft Visual C++ 6. Not sure how this will turn out, but here we go. :lol:
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

hi incenseman. long time no see
Herp derp.
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Post by paradoxnj »

I have Microsoft Visual C++ 6. Not sure how this will turn out, but here we go
The DirectX SDK does not support VC6 anymore. You have to have 2003 and above.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

Just another way that microsoft tries to get more of my very hard earned cash. Is there a ready to use open source compiler out there that some one can tell me the name of and where to get it exactly and how to set it up to compile RF?

@darksmaster923: I have been working on other things while waiting for the next release of RF. I have a business that sells Incense and Scented Moisturiser Lotions. It has been keeping me pretty busy. I sell it to stores right from my house. Business is pretty slow so I decided to check and see what was happening in the wonderful world of RF.
Last edited by incenseman2003 on Thu Aug 30, 2007 3:03 am, edited 1 time in total.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

incenseman2003 wrote:Just another way that microsoft tries to get more of my very hard earned cash. Is there a ready to use open source compiler out there that some one can tell me the name of and where to get it exactly and how to set it up to compile RF?
i thought vc 2005 express could compile rf75c and its free
unless you dont have rf75c
Herp derp.
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Post by paradoxnj »

Just another way that microsoft tries to get more of my very hard earned cash.
How can they move into the future if they keep spending time in the past? VC6 is over 7 years old. Move on... Oh...and they love your hard earned cash so much that they are giving away free versions of their VS2008 product (Express Editions). Sorry...I just can't stand statements like that. :evil:
Is there a ready to use open source compiler out there that some one can tell me the name of and where to get it exactly and how to set it up to compile RF?
To darkmaster you listen. :) It would be perilous to use any other compiler (especially GNU stuff). If you want to attempt it, I suggest you try to get it to compile with Code::Blocks.
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

MinGW would probably work with a -huge- amount of modification to the code. I use it for compiling RF2 (because VC++ has poor/expensive support for compiling multiple source files from a single project at the same time), but RF was really never designed to work on any compiler other than VC++... IMO, it wouldn't be worth the effort.
incenseman2003
Posts: 320
Joined: Sat Mar 11, 2006 11:41 pm

Post by incenseman2003 »

@paradoxnj: Did you really spend time and waste server spqce just to pick on what I said just because you didn't like it? I'm flattered!! I really want to explain how important your opinion is to me. Here we go......



So anyway, I have Downloaded and installed vc 2005 express. I tseems pretty cut and dry.

I have just a few questions.

QuestOfDreams said to do the following to set up Microsoft Visual C++:
Go to Tools->Options...
In the tree view click on Projects and Solutions and then on VC++ Directories

I cannot find a "VC++ Directories" in any part of the the tree view under tools and then options. Might it be called something else?
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

yes it is there, you go Tool->Options->Projects and Solutions->and there it is.
Once I was sad, and I stopped being sad and was awesome instead.
True story.
Post Reply