C++11

Everything about development and the OpenMW source code.
Post Reply
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: C++11

Post by corristo »

Yep, but this GCC is pretty old (4.2) and knows nothing about c++11, it kinda defeats the purpose.

I don't see any point in supporting OS X below Lion. Actually, we don't support 32-but builds (actually I'd like to provide such support, but it will involve a lot of mess with Ogre for example because Ogre assumes that 32-bit builds are always use Carbon, not Cocoa) on OS X, any Mac that can into 64-bit can upgrade to Lion.

And hey, we'll have 10.9 in month or two.

And yes, it's impossible to mix libstdc++ & libc++. For example, their std::string implementation details differ. So if you pass some string from OpenMW built against libc++ to library built against libstdc++, you'll get some undefined behaviour or just crash.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: C++11

Post by scrawl »

@corristo, how are we on this now that we are using 1.9?
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: C++11

Post by corristo »

@scrawl I've not migrated to 1.9 yet, planning to do so ASAP. I'll write here when I'm ready.
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: C++11

Post by corristo »

Migrated to Ogre 1.9. The next step is to rebuild all reps against libc++, to be able to switch to C++11.
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: C++11

Post by corristo »

Gentlemen, I finally managed to make C++11 build on OS X. Here's my branch with required changes: https://github.com/corristo/openmw/tree/osx-c%2B%2B11

Here's the diff: https://github.com/corristo/openmw/comm ... 28e214c1c0

Could you Windows and Linux guys check if this builds in C++11 mode?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

I am having major trouble here. Apparently the default boost install on Linux Mint 13 does not work with c++11. I manually installed boost 1.55, ended up in dependency hell and then after rebuilding the entire universe found out that the default build of 1.55 does not support c++11 either. Guess I could start from scratch again, this time with c++11 enabled.

The question here is as follows: Is that a general problem even for newer preinstalled boost packages on Linux? Or do they come with c++11 support enabled? If they don't then we need to do something different, because we can not require everyone to rebuild boost. The only problem seems to be the function copy_file from boost filesystem and we can probably work around that if necessary.
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: C++11

Post by corristo »

That's weird, both C++11 and non-C++11 linux builds of boost use one and the same libstdc++, I'm surprised that any rebuilding is required.

I had to rebuild all deps on mac only because non-C++11 builds used libstdc++ and C++11 is only possible with libc++. But that's not the case for Linux.
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: C++11

Post by cc9cii »

Not sure if I have to do anything different to compile in C++11 mode, but your patch compiles & runs fine (I didn't change any of the dependencies, i.e. Ogre, Boost, etc). Having said that I didn't pay too much attention to whether there were any additional warnings (I usually get hundreds so I'm conditioned to ignore them)

I'm using VS2012 (Version 11.0.61030.00 Update 4). Windows 7 x64. Only test-built openmw x64 Release version.

EDIT: oops
User avatar
Jyby
Posts: 408
Joined: 10 Dec 2013, 04:16

Re: C++11

Post by Jyby »

What is the progress of this so far?

What do we need to make the full conversion?
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: C++11

Post by corristo »

We still need feedback from Linux and Windows guys.
Post Reply