Author Topic: Visual Studio 2010 and C++11  (Read 2116 times)

0 Members and 1 Guest are viewing this topic.

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Visual Studio 2010 and C++11
As the discussion about this issue on github pointed out, we may soon find ourselves with a situation where MSVS 2010's compiler is insufficiently standards-compliant for our needs.

Luckily, there's an alternative. clang, an open-source compiler for C and C++, provides a toolset that is compatible with all VS versions from 2010 onward, which you can download here: http://llvm.org/builds/

Now, be aware that this is experimental for the moment. We will have to investigate if there are any issues being caused by using this toolset; if you find any, please report them either here or on Mantis.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Visual Studio 2010 and C++11
Is it to the point that clang is a simple installer, and we could default 2010 to use it as long as it's in a default location or PATH or whatever?  We should probably update our README soon once the compiling options get sorted out on various platforms.

Also, we found a bug in the Apple clang with Xcode 5.1.1 which is the last version for OS X 10.8.  I will be seeing if it's fixed in Xcode 6.x soon,but dropping in an alternative clang compiler for Xcode could get us AddressSanitizer support on OS X too.  Apple has left that unavailable by default so far.
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 The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Visual Studio 2010 and C++11
It's a simple visual studio extension installer, you run it, and it's available as a toolset in the project settings thereafter. Theoretically, we could alter the VS2010 solution to default to that.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline m!m

  • 211
Re: Visual Studio 2010 and C++11
I don't think this will actually fix the issues that were discussed in the PR you linked to. I think the issue we currently have are caused by the STL implementation of VS2010 but they aren't actually caused by the compiler itself. I am not sure how clang handles it but I think it uses the MS STL implementation (at least I couldn't find an implementation in the headers the installer supplied) so it actually wouldn't solve our issues.

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Visual Studio 2010 and C++11
My daily driver is VS2010 so I will check out this pull request and the proposed solution this evening.

Having said that I do now have a more recent VS available so if it doesn't work out I am not stuck.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Visual Studio 2010 and C++11
I do like that it has ASan in the clang builds.  Even those running newer versions could install this alongside to get an ASan FSO build on Windows.  That could be incredibly useful, if we can make sure we can get the output in the event of a crash :P

If it won't fix VS 2010, that's a bummer, but if we think it might, I can go ahead and give it a shot.
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 chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Visual Studio 2010 and C++11
Another downside is that clang can't work with the native MSVC 2010 debugger, as it only works with PDB, and clang can't output PDB information.  At least, according to this.
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: Visual Studio 2010 and C++11
I don't think this will actually fix the issues that were discussed in the PR you linked to. I think the issue we currently have are caused by the STL implementation of VS2010 but they aren't actually caused by the compiler itself. I am not sure how clang handles it but I think it uses the MS STL implementation (at least I couldn't find an implementation in the headers the installer supplied) so it actually wouldn't solve our issues.

Don't forget we still have STLport in the FSO repository.  Have you tried using it as the STL implementation for Visual Studio 2010 instead of Microsoft's STL?

 

Offline m!m

  • 211
Re: Visual Studio 2010 and C++11
As far as I can tell STLPort doesn't support C++11 (at least I couldn't find any indication of that in the headers).

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Visual Studio 2010 and C++11
STLPort is a dead project, more or less. Their last release was in 2008.

Actually, not that dead. The last commit to their public repo was in 2012. Still, no releases or blog posts or anything.
« Last Edit: May 14, 2015, 02:22:00 am by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns