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

C++11 compatibility #42

Open
mbrucher opened this issue Apr 22, 2016 · 6 comments
Open

C++11 compatibility #42

mbrucher opened this issue Apr 22, 2016 · 6 comments

Comments

@mbrucher
Copy link

There seems to be some issues in Gamma includes (scl.h) if cstdint is added afterwards.
Lots of header inclusions seem also to be C related (math.h, sodlib.h...), and not C++. This means that the library cannot be mixed with proper C++ libraries that abide by the C++03/C++11 standard :/

@LancePutnam
Copy link
Owner

I'm well aware of the problems with math.h. I started a new c++11 branch to resolve those issues. Maybe you could give it a try and see if it works for you?

@mavavilj
Copy link

I'd try the C++11 branch, but I don't know how to build it on Windows and VS2013. Is using Mac/Linux the only option?

I also tried the builds here:
https://github.com/AlloSphere-Research-Group/Gamma/

but using the devel branch CMake gives the error:

CMake Error at CMakeLists.txt:13 (message):
The compiler C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe has no C++11 support. Please use a different C++
compiler.

@mbrucher
Copy link
Author

Visual Studio 2013 definitely has some C++11 support, and as the error is on the intxx_t types, it should work as well.

@LancePutnam
Copy link
Owner

Gamma works with Windows. I used to have a VS project, but I removed it due to lack of interest in maintaining it. The library is meant to be included from source in projects, so it should more or less straightforward to create your own VS project.

@mbrucher
Copy link
Author

Obviously, it doesn't. Mixing Gamma with another C++ library that defines through the official standard way int32_t fails as #41 shows.

@LancePutnam
Copy link
Owner

I stated that poorly. You are right about the master branch, but there has been success compiling with MSVC with the c++11 branch as #37 shows. Replacing some of the C ".h" includes with their "c" C++ counterparts helped. There still might be an issue with including cstdint after/before pstdint.h, but I will need someone to test that. If there still is a problem, then the only solution I can think of is to remove pstdint.h in favor of cstdint (support for cstdint under MSVC was flakey in the past, hence pstdint.h).

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

No branches or pull requests

3 participants