Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libc++ support (C++11) #1864

Closed
caseybasichis opened this issue Feb 8, 2013 · 14 comments
Closed

Libc++ support (C++11) #1864

caseybasichis opened this issue Feb 8, 2013 · 14 comments

Comments

@caseybasichis
Copy link

Has anyone done any work towards implementing Libc++ compatibility with OF?

@bilderbuchi
Copy link
Member

Do you primarily care about Libc++ or C++11 (as the title seems to suggest)? Because gcc/libstdc++ already support most of the C++11 features afaik.

@caseybasichis
Copy link
Author

Libc++ is the concern, I was just mentioning C++11 to give context incase people were unfamiliar.

@bilderbuchi
Copy link
Member

Interesting SO answer in weak connection to that: http://stackoverflow.com/a/12546314/599884

@tgfrerer
Copy link
Member

That's a great reference, @bilderbuchi, cheers! Shall we consolidate the discussion around c++11/libc++ efforts in issue #2335 ?

@bilderbuchi
Copy link
Member

Thanks. :-)
I'd rather consolidate here, because this issue has temporal precedence, a better title, and is not yet polluted with pages of discussion about this dynamic_cast_tag mess (which is just an implementation detail of the drive to achieve C++11 compatibility.

Also, maybe we should separate the wish for libc++ and the wish for C++11 a bit. Do we want to have C++11 support on mac (which seems to imply using libc++, but I'm not really sure why this is. I guess clang?), or do we want to have it everywhere, in which case libc++ support is just a part of that issue.

@tgfrerer
Copy link
Member

Sure thing.

Then maybe let's just cross-reference the cpp11-org here, too: https://github.com/organizations/openFrameworks-cpp11

libc++ / Clang is afaik the way forward on Mac if you want to use modern c++11, since Apple seem to discontinue gcc support out of the box (i.e. bundled with XCode) in favour of the LLVM / clang compiler suite, which has a more permissive MIT-style license (and which Apple have been co-funding/developing).

A couple of other things I happened upon while researching:

@bilderbuchi
Copy link
Member

gcc also claims full support by now (although they still call it "experimental"). The only feature which is "no" on gcc, is "N/A" on clang, too.

@bilderbuchi
Copy link
Member

OK, scratch that, I made an general/collector issue regarding C++11 on OF: #2577
Let's keep this one mainly for libc++ on MacOS.

@abergmeier
Copy link
Contributor

Just for reference, we use oF with libc++ 3.2 (possibly 3.4 in a few months) in Emscripten. Works mostly fine - aside from some Emscripten specific issues around e.g. std::exception_ptr.

@sarith
Copy link

sarith commented Feb 2, 2014

Any word on this? I've been having to port a project over to Cinder (as I saw you have had to do also on your post on the OF forums) -- specifically because I'm using several binaries that compile only against libc++.

@ofTheo
Copy link
Member

ofTheo commented Feb 2, 2014

the main issue is that switching to libc++ requires a recompile of all the libs.
however we might need to do a recompile of libs fairly soon.

so we could make that switch then - maybe for 0.8.1?

@bilderbuchi
Copy link
Member

post-0.8.1, please, otherwise we'll delay release even more (also, this sounds like a big enough feature to warrant a 0.9 version)

@tgfrerer
Copy link
Member

tgfrerer commented Feb 3, 2014

Hm. i'm all in for switching to libc++, and the openFrameworks-C++11 branch is functional (with libs & recipes compiling), although I saw a weird assert failing on 16 bit float TIFF images with Freeimage, which seems to be a bug in Freeimage, but i think - and agree with @bilderbuchi - that 0.8.1 might be too early.

My main concern would be a clang-compiled core might not be compatible with gcc compiled addon libs (i.e. openCV) - and the transition (especially for new people) there painful.

But then, as said above, it seems that Apple is quietly dropping gcc support as compiler of choice and there might be no way past clang, eventually.

@bilderbuchi
Copy link
Member

fixed by #3627, afaict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants