Author Topic: Trying to set up a compiling environment  (Read 3956 times)

0 Members and 1 Guest are viewing this topic.

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Trying to set up a compiling environment
Ok, I'm trying to finally get a decent compiling environment set up, from what I've heard the project files seem to be in better shape and I'm hoping that the SVN stuff is much easier to work with than the code that was in CVS, so I figured I'd try again.  I just had a question about the compilers.  I'd like to use Visual C++ 2008 Express Edition, but was wondering if it's really any better than the 2005 Express Edition.  Also, is it necessary or helpful to install the Platform SDKs that go to each of these compilers?  Just wondering if anyone had any recent experiences with these compilers and FSO.

Edit:  Also, one guide refers to needing the DirectX SDK, but I was pretty sure that wasn't needed anymore, correct?
« Last Edit: April 09, 2008, 11:38:13 am by chief1983 »
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Trying to set up a compiling environment
Great!  I hope to help you succeed.  I don't know how the 2008 version differs from the 2005 version, but I plan to give it a try.  I got it to work with the 2005 Express Edition last December.

You will need some sort of Platform SDK... to make things confusing, the latest versions of this is now called the Windows SDK.  They really don't make this clear, but the latest versions of that do work with all previous versions of Windows.  I got it to work with the Windows SDK Update for Windows Vista, even though I myself am still on Windows XP.  Apparently there is now a Windows Server 2008 SDK, too.  I don't think you need the DirectX SDK, but I did get it myself for some of the texture tools.

If you run into problems, let me know.  I plan to go try 2008 Express Edition combined with this new 2008 SDK and see what happens.

 

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Trying to set up a compiling environment
I think I was just going to try to install one thing at a time.  From what I could remember, you used to only need the Platform SDK if you wanted to compile FRED, but that might be wrong.  The old compiler threads also mentioned needing the DirectX SDK, but I'm guessing that DirectX support is currently disabled by default in the trunk, so I hope it's not needed either.  I'll let you know how I fare, I'll hopefully have everything compiling tonight.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Trying to set up a compiling environment
You shouldn't need the DirectX SDK any more.

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Trying to set up a compiling environment
Good zark that was easy.  I just got Express Edition 2008 and the Server 2008 SDK, and it converted and compiled the FSO 2005 project with no problems!

Fred2 won't compile, but as far as I know that's a known issue with the Express Editions not including MFC/ATL.

Other than that, wow.  This is a far cry from when I was struggling with the MSVC 6 project a few years ago.

 

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Trying to set up a compiling environment
I thought the platform/windows/server/whatever SDK was what was needed to compile FRED, as I thought it had all the MFC stuff and whatever.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Trying to set up a compiling environment
Thought so too, but I can't get it to work.  It doesn't seem to be in any of the Windows SDKs I have after 2005.  Microsoft says this is intended.  I would guess an older platform SDK would need to be found or something.  You're welcome to experiment.

Other things I just discovered:  Express Edition 2008 comes with the Windows SDK built in, so if we ignore FRED for now, all that is needed to download is the C++ 2008 Express!  Wow!

On the other hand, apparently the Server 2008 SDK comes with an updated Speech SDK, which means that all we have to do is add FS2_SPEECH to code's Preprocessor Definitions, and ... crap, upon compiling, apparently that wants ATL too.  Well I guess there's a reason it's free... but hey, it's better than nothing.  And who knows, there may yet be a way.

 

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Trying to set up a compiling environment
Yeah, I suppose I could install the Windows Server 2003 Platform SDK and see if that does it, but I guess I'm not too worried about FRED.  Would have been nice if their latest stuff could just do everything though.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Trying to set up a compiling environment
So as I feared, there's apparently no way to get the Express editions to compile FRED.  The newer Windows SDK has no MFC, and the MFC files that come with the older Platform SDK are too old and were never intended to be a full MFC setup.  So until FRED is wxWidgets or qt or whatever, it looks like it'll take something a little beefier to compile it.  So for free, it looks like all you can do is compile FS2_open, but that's not too shabby though.  MSVC++ Express 2008 works flawlessly right out of the box with the 2005 project file.  I just copied it to a new folder, converted it, and everything except FRED compiles perfectly.  So I suggest this for anyone looking at just getting FSO compiling working, without FRED, on Windows.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Trying to set up a compiling environment
As far as I'm aware, the MFC libraries only come with the Standard,Pro, etc.. editions of Visual Studio - the platform SDK doesn't include them.
I got the latest out of SVN, but had to modify a few files to remove the TrackIR support - did I get the wrong files?
Otherwise everything compiles first time (with a lot of warnings about conversions)!
STRONGTEA. Why can't the x86 be sane?

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Trying to set up a compiling environment
Which project files did you use?  Sounds like the trackir files just weren't in the project, but they're easy to add... just add code\io\trackir.cpp and code\io\trackir.h .  Afaik the 2005 project has been updated to include them.

Yeah, there are conversion warnings.  taylor has been winnowing them down though.  You should have seen it last year :p

 
Re: Trying to set up a compiling environment
Just a straight checkout, then the 2005 project - converted to a 2008 project
Not having the TrackIR files in there would explain the errors - I just put ifdefs around them
Otherwise, builds and runs beautifully - cheers guys!
STRONGTEA. Why can't the x86 be sane?

 

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Trying to set up a compiling environment
I wonder if that's something that just changed recently then, because I checked it out a week or so ago, converted the project and had no compile errors in release or debug.  Guess I should update my code more often though.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Trying to set up a compiling environment
I stand corrected - I had an old checkout
Checking it out again fixed all the problems
Compiles without errors now
STRONGTEA. Why can't the x86 be sane?

 

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Trying to set up a compiling environment
Ok, so I decided to install my Visual Studio 2008 Pro copy, so I could have the mfc stuff and compile fred.  Everything through the FSO build compiles fine, but when it hits FRED, I get a bunch of the following error:

Code: [Select]
5>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error :  _WIN32_WINNT settings conflicts with _WIN32_IE setting
Anyone use VS2008 have any idea what's up?  I mean I had hoped it would Just Work, like fso did, but I guess that's not the case still.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Trying to set up a compiling environment
Turns out that the WINVER definition is set in the property pages of the project
Open up the properties for FRED2 and make sure that you're selected all configurations
Remove the WINVER=0x410 from the preprocessor definitions
In stdafx.h add the following before anything else:
After the commented out VC_EXTRALEAN, add this:
Code: [Select]
#ifndef WINVER                          // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0502           // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINNT            // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0502     // Change this to the appropriate value to target other versions of Windows.
#endif

#ifndef _WIN32_WINDOWS          // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE                       // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0700        // Change this to the appropriate value to target other versions of IE.
#endif

That sets the target as WindowsXP
My guess for the reason is that VS2008 has different MFC headers (VC feature pack will do that to you!)

Hope this helps!

EDIT: You'll need to add stdafx.h as the first include in folderdlg.cpp to ensure that the winver definition is used there as well
(NB: I might have missed something else - fighting with the featurepack redist which doesn't install on vista!, so I can't run it atm, can only compile :()
« Last Edit: April 22, 2008, 08:53:06 am by portej05 »
STRONGTEA. Why can't the x86 be sane?

 

Online chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Trying to set up a compiling environment
Yup that helped a lot, FRED _almost_ compiled.  I just got one error, every other file managed to compile just fine.

Code: [Select]
1>..\..\code\fred2\Sexp_tree.cpp(4247) : error C2065: 'IDB_DATA_15' : undeclared identifier
This typical?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

  

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Trying to set up a compiling environment
That was a bug.  Run an update and it should be fixed.