SFML community forums

Help => General => Topic started by: Caleb P on May 28, 2014, 06:12:13 pm

Title: SFML and V8
Post by: Caleb P on May 28, 2014, 06:12:13 pm
I'm trying to use SFML as my graphics backbone for a C++ game engine. I'm also using the V8 JavaScript engine. The problem is, to get V8 to compile, I've got to use -stdlib=libstdc++, and to get SFML to compile, I've got to use -stdlib=libc++. Obviously, I can't use both, so how can I work around this?

I'm using Xcode on a Mac Mini, by the way, but it doesn't work through the terminal either.

- C
Title: Re: SFML and V8
Post by: Nexus on May 29, 2014, 11:27:46 am
Why do you need a specific standard library for each library, what exactly is the constraint here?
Title: Re: SFML and V8
Post by: select_this on May 29, 2014, 11:37:17 am
libc++ is currently not feature-complete on several platforms, so I'd be quite surprised if SFML relied on it.
Title: Re: SFML and V8
Post by: Hiura on May 29, 2014, 11:41:20 am
If you really need to post the same message across the Internet, at least add a reference to it... I'm not going to copy past my answer here. http://stackoverflow.com/questions/23916911/building-sfml-and-v8

@select_this: On OS X, if you want C++11 support you have to play with Apple's rules or face nightmares. In this case, you'd better use libc++ since the provided libstdc++ binary is really old. But SFML works with both anyway.
Title: Re: SFML and V8
Post by: select_this on May 29, 2014, 11:45:19 am
Ah okay, my ignorance of all things Apple once again shines through. Thanks for the correction!

EDIT: found some literature from someone who got libv8 to compile with libc++ here (https://code.google.com/p/v8/issues/detail?id=3072#c4) - it might be useful info for you.
Title: Re: SFML and V8
Post by: Caleb P on May 30, 2014, 12:33:13 pm
Thanks to everyone - at the moment, @Hiura's answer works, but I think I'll try compiling V8 with libc++ and see where that takes me.

Thanks again :)

- C