Compiling RF2 on Windows

Discuss the development of Reality Factory 2
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Compiling RF2 on Windows

Post by AndyCR » Sun Apr 15, 2007 10:16 pm

For those who wish to just get RF2 itself and not bother with compiling it (most of you), there should be a build ready for you soon. The current Ogre build is very minimal.



Support for Visual C++ 2005 ( v8 ) has been added. If you have ANY issues doing it please post about it so I can prevent others from having the same issue.

Due to the server issue, I will have to paste it in here.


Reality Factory 2 Compilation Guide for Windows

This guide illustrates compiling Reality Factory 2 on Windows using Visual C++ 2005.

Set up Visual C++ 2005 and the Platform SDK

First, you will of course need Visual C++ 2005; you can download the Express edition for free at http://msdn.microsoft.com/vstudio/express/visualc/ .
The platform SDK should now be installed. To do this, follow the instructions at http://msdn.microsoft.com/vstudio/expre ... usingpsdk/. This will take quite awhile, depending on your connection speed. After you have done this, don't forget to:
One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib"

to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
Finally, you need to install service pack 1 for VC++, which can be found at http://www.microsoft.com/downloads/deta ... laylang=en . Choose VS80sp1-KB926748-X86-INTL.exe and install it.

The Ogre SDK

You should now download and install the Ogre SDK. You should use version 1.2. You can download it at http://downloads.sourceforge.net/ogre/O ... e?download .

The Python SDK

You now need to install the Python 2.4 SDK. You can download it at http://www.python.org/ftp/python/2.4.4/python-2.4.4.msi .

The Boost SDK

You also need the Boost SDK. You can download it at http://www.boost-consulting.com/boost_1_33_1_setup.exe . In the setup process, choose Visual C++ 8.0 as the compiler. Under Variants, choose “Single thread, static runtime”. Click next, check Boost Python, then click next again.
NOTE: This may not work due to library incompatibilities if you are running Windows Vista. If this is the case (you will get very weird compile errors), you must compile Boost by hand. You can choose to only compile and install Boost Python, which is all RF2 currently requires, by appending “--with-python” to the end of the install command.

Set it all up in Visual C++

Now that we have downloaded all the dependencies, we will need to tell VC++ where to find them. Open Visual C++ and click Tools->Options. Select Projects and Solutions->VC++ Directories. Under Show directories for, select Include files. Click add, fill in “C:\Python24\include” without quotes, and press enter. Click add again, fill in “C:\OgreSDK\include”, again without quotes, and press enter. Add, “C:\Program Files\boost\boost_1_33_1”, enter. Add, “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include”, enter.
Next, change Show directories for to Library files. Add, “C:\Python24\libs”, enter. Add, “C:\OgreSDK\lib”, enter. Add, “C:\Program Files\boost\boost_1_33_1\lib”, enter. Add, “C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib”, enter. You can now finally click OK.

Grab the RF2 source code, build, and enjoy

NOTE: Normally, you could download a build pack to more easily have the RF2 source code. Currently, however, our download server is down, so you will have to use the following method.
Download and install TortoiseSVN from http://tortoisesvn.net/downloads . Restart your computer, then right-click in the folder you wish to download RF2 to. Click SVN Checkout. In the URL of the Repository field, put http://realityfactory2.svn.sourceforge. ... ory2/trunk . Click OK. You should see a dialog that shows the files being downloaded.
Open the folder it checked out to, then open the realityfactory2/build folder. Open RealityFactory2.sln, find the dropdown that says "Debug" and change it to "Release", and click Build->Build Solution. If all goes well, you should have a RealityFactory2.exe file in the realityfactory2 folder. You will now need to copy all DLL files from C:\OgreSDK\bin\release into the realityfactory2 folder, along with boost_python-vc80-mt-1_33_1.dll from C:\Program Files\Boost\boost_1_33_1\lib. Afterwards, you should be able to run RF2 by double-clicking RealityFactory2.exe.

Trouble?

If you have any trouble please post in the RF2 forum at http://www.realityfactory.info/forum/viewforum.php?f=13 or post to the mailing list, realityfactory2-devel@lists.sourceforge.net .
Last edited by AndyCR on Tue Jul 17, 2007 11:35 pm, edited 3 times in total.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Mon Jul 16, 2007 7:50 pm

Cant wait for the exe file. going to compile the s-code now. 8)

Can I use VB 6 or Visual studo. net to compile this. :?:
He's a Bot Jim, But not as we know It.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Mon Jul 16, 2007 11:58 pm

I've only tested it on VS2005 Express, though I think David uses the non-Express version of 2005. I think it should work on 2003, but I doubt it will work on 6. (Boost has issues with 6 because of 6's poor support for real C++)

If you want, I can upload a current build to save you the time.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Tue Jul 17, 2007 12:20 am

about to get the RF2 source code lets see if I can do it :arrow:

PS. DAVID.... WHICH DAVID :?:
He's a Bot Jim, But not as we know It.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Tue Jul 17, 2007 12:43 am

Ok This is what I'm getting

------ Build started: Project: RealityFactory2, Configuration: Debug Win32 ------
Compiling...
application.cpp
pythoninterface.cpp
realityfactory.cpp
scriptrunner.cpp
coord.cpp
texture.cpp
objectsmodule.cpp
setupmodule.cpp
Generating Code...
Linking...
Creating library C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\/../\RealityFactory2.lib and object C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\/../\RealityFactory2.exp
realityfactory.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function __catch$_WinMain@16$0
C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\/../\RealityFactory2.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\Debug\BuildLog.htm"
RealityFactory2 - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
and buildlog

Build Log Build started: Project: RealityFactory2, Configuration: Debug|Win32
Command Lines Creating temporary file "c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\Debug\RSP00000124483008.rsp" with contents
[
/Od /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W2 /c /Wp64 /ZI /TP "..\src\setupmodule.cpp"

"..\src\objectsmodule.cpp"

"..\src\texture.cpp"

"..\src\coord.cpp"

"..\src\scriptrunner.cpp"

"..\src\realityfactory.cpp"

"..\src\pythoninterface.cpp"

"..\src\application.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\Debug\RSP00000124483008.rsp" /nologo /errorReport:prompt"
Creating temporary file "c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\Debug\RSP00000224483008.rsp" with contents
[
/OUT:"C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\/../\RealityFactory2.exe" /MANIFEST /MANIFESTFILE:"Debug\RealityFactory2.exe.intermediate.manifest" /DEBUG /PDB:"c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\RealityFactory2.pdb" /MACHINE:X86 boost_python-vc80-mt-1_33_1.lib python24.lib OgreMain_d.lib kernel32.lib

".\debug\application.obj"

".\debug\pythoninterface.obj"

".\debug\realityfactory.obj"

".\debug\scriptrunner.obj"

".\debug\coord.obj"

".\debug\texture.obj"

".\debug\objectsmodule.obj"

".\debug\setupmodule.obj"
]
Creating command line "link.exe @"c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\Debug\RSP00000224483008.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Output Window Compiling...
application.cpp
pythoninterface.cpp
realityfactory.cpp
scriptrunner.cpp
coord.cpp
texture.cpp
objectsmodule.cpp
setupmodule.cpp
Generating Code...
Linking...
Creating library C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\/../\RealityFactory2.lib and object C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\/../\RealityFactory2.exp
realityfactory.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function __catch$_WinMain@16$0
C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\/../\RealityFactory2.exe : fatal error LNK1120: 1 unresolved externals
Results Build log was saved at "file://c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\Debug\BuildLog.htm"
RealityFactory2 - 2 error(s), 0 warning(s)

HHHHHHHHHHEEEEEEEEEEELLLLLLLLLLLLLLPPPPPPPPPPPPPPP
He's a Bot Jim, But not as we know It.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue Jul 17, 2007 10:13 pm

David's the other programmer working on RF2.

Did you follow this part?
One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib"

to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
Also you might keep in mind that though that part is the current RF2 build, it doesn't have much implemented for scripting (David is working on that part). If you want a build to mess around with scripting wise, I would reccomend the Irrlicht version which is in CVS.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Tue Jul 17, 2007 10:21 pm

Sorry I must be blind but
One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib"
was not in you first post.

but will try it now. please god let it work ( or I'll hate c++ for life )
He's a Bot Jim, But not as we know It.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue Jul 17, 2007 10:25 pm

Yeah, it was in a linked page, sorry for the confusion.

Hope it works!

EDIT: You might have to restart VC++ after you edit it before it'll take effect.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Tue Jul 17, 2007 10:29 pm

please hold on dont go any where trying it now
He's a Bot Jim, But not as we know It.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Tue Jul 17, 2007 10:47 pm

compile works. :D

but when runnning rf2 exe got a cant find OrgeMain_d.dll cat find error.

all I've got is a OrgeMain.dll file
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
works can you edit you first post with this added
He's a Bot Jim, But not as we know It.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue Jul 17, 2007 10:53 pm

Ah. In the dropdown in VC++ which says Debug, click Release, then recompile it and it should work fine.
Last edited by AndyCR on Tue Jul 17, 2007 11:37 pm, edited 1 time in total.

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Tue Jul 17, 2007 11:07 pm

Ok changed to Release, This is the errors,

------ Rebuild All started: Project: RealityFactory2, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'RealityFactory2', configuration 'Release|Win32'
Compiling...
setupmodule.cpp
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
objectsmodule.cpp
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
texture.cpp
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
coord.cpp
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
scriptrunner.cpp
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
realityfactory.cpp
pythoninterface.cpp
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
application.cpp
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(118) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
C:\Program Files\boost\boost_1_33_1\boost/python/converter/builtin_converters.hpp(120) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
Linking...
Creating library C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\\..\\RealityFactory2.lib and object C:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\\..\\RealityFactory2.exp
Generating code
Finished generating code
Embedding manifest...
Build log was saved at "file://c:\Documents and Settings\ardentcrest\Desktop\RF Two\realityfactory2\build\Release\BuildLog.htm"
RealityFactory2 - 0 error(s), 42 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


42 warning(s) no warnings would be nice

can you give just a working rf2 exe file. we can get all the other files.
He's a Bot Jim, But not as we know It.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue Jul 17, 2007 11:16 pm

Did you try running the file? The warnings are fine, they aren't errors and don't affect the exe (it's a problem with boost).

User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Post by ardentcrest » Tue Jul 17, 2007 11:23 pm

YES IT WORKS>>>>>>>>>>>>>>>>>>>>>

I got the ORGE Render Window.

and that all.


Up date fitst post and tell all how to do it..

ps. up date the c++ script to give a rf2 logo or something rf2'ish
He's a Bot Jim, But not as we know It.

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Tue Jul 17, 2007 11:29 pm

Glad it works!

Done, instructions should work as posted now.

EDIT: By the way, whenever there are changes to RF2 you now should be able to get them by right-clicking the RF2 folder and choosing SVN Update, then opening RF2 in VC++ and compiling it. There won't be for awhile since David's on a trip and I'm working on the script editor though.
Last edited by AndyCR on Tue Jul 17, 2007 11:32 pm, edited 1 time in total.

Post Reply