About Store Forum Documentation Contact



Post Reply 
linux C++11 support
Author Message
yvanvds Offline
Member

Post: #1
linux C++11 support
hey

I get the following error when trying to use my soundengine in an Esenthel project, using linux:

Code:
This file requires compiler and library support for the
ISO C++ 2011 standard. This support is currently experimental, and must be
enabled with the -std=c++11 or -std=gnu++11 compiler options.

My library needs c++11, so that is quite understandable. When I'm working with the windows version of esenthel, i can link it just fine, but not on linux. I guess VS uses c++11 by default, but on linux you need the compiler option.

Do you think it is possible to add that, or perhaps have an extra line at application properties to add custom compiler options?

One other thing: When working with custom libraries it is only possible to add one set of libraries for all platforms. But of course the path for the libraries i need while compiling for android is different to the one i need for windows or linux. So I have to reenter them every time i switch compiler target. Which gets a bit annoying after a time. wink

Regards,

yvan
01-11-2014 08:41 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: linux C++11 support
Hi,
(01-11-2014 08:41 PM)yvanvds Wrote:  
Code:
This file requires compiler and library support for the
ISO C++ 2011 standard. This support is currently experimental, and must be
enabled with the -std=c++11 or -std=gnu++11 compiler options.
Can you send me a sample project so I could test this?

Quote:When working with custom libraries it is only possible to add one set of libraries for all platforms. But of course the path for the libraries i need while compiling for android is different to the one i need for windows or linux. So I have to reenter them every time i switch compiler target. Which gets a bit annoying after a time. wink
Are you talking about *.h paths or *.lib/*.a paths?

I'm thinking of doing separate *.lib paths for all platforms,
and Windows + Non-Windows paths (2 total) for *.h paths
01-12-2014 02:14 AM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #3
RE: linux C++11 support
The library I'm working on is not finished and needs a lot of dependencies to compile. Perhaps this is enough:
Code:
#include <atomic>

namespace myheader {
  void test() {
    std::atomic<int> x = 42;
  }
}

If you put the above code in a file called myheader.h and put its path in the include section of the application properties, you can just put:
Code:
myheader::test();

somewhere in Init(). You will get a whole bunch of errors related to C++11, but the first one is the one i mentioned. Is that enough for you to work with?

About the header/lib paths: 2 paths each would be a big improvement. For osX, linux and windows i have a PC each, but i still have to fit in compilation for iOS and Android somewhere. Not a problem as long as no external libs are needed, but since I am porting my sound engine to android atm, it gets a bit complicated.

Including whole directories would be nice, but i can work around that. Since you haven't implemented that from the beginning, i guess that there's a reason.
01-12-2014 11:34 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: linux C++11 support
Thank you very much!

I'll do some tests with this

Each platform will have their own *.lib *.a libs properties

But for the headers there will be just two:
windows (for c:/ d:/ style paths)
non-windows (for / style paths)
I'm doing this since you can include the same header file for all platforms (the only thing what's different is the drive style path)
01-15-2014 03:34 AM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #5
RE: linux C++11 support
Great to know about this... very very useful features smile Thx
01-18-2014 11:18 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: linux C++11 support
Thank you, C++11 should work ok in next release.
01-27-2014 12:45 AM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #7
RE: linux C++11 support
That's great news! Thanks.
01-27-2014 02:38 AM
Find all posts by this user Quote this message in a reply
Post Reply