LancePutnam / Gamma

Generic (Sound) Synthesis Library
Other
458 stars 54 forks source link

MSVC 2015 compilation #37

Closed mhetrick closed 8 years ago

mhetrick commented 8 years ago

Gamma compilation is broken again on MS Visual Studio 2015. Replacing pstdint.h with the latest version fixes most of the errors: http://www.azillionmonkeys.com/qed/pstdint.h

I'm looking to see if the rest of the errors are related to our code, JUCE, or Gamma.

mhetrick commented 8 years ago

Okay, I figured it out...

MSVC 2015 compilation needs that updated pstdint.h. I'll file a pull request.

MSVC 2013 AND 2015 compilations were broken by commit f5ec5c7083da6fe0e149869c86973e2eda98b52d ("Move platform detection before macro use")

That commit causes a conflict between Gamma and math.h. It's either a Gamma Windows issue, or it's a conflict with JUCE, Gamma, and Windows.

LancePutnam commented 8 years ago

Is there still a problem or does the new pstdint.h fix everything?

mhetrick commented 8 years ago

pstdint.h fixes part of it, but there are still a number of errors caused by the listed commit. Reverting to the previous commit fixes the rest of the errors.

pstdint.h fixes errors specifically for MSVC 2015. "Move platform detection before macro use" caused errors on both 2015 and 2013.

LancePutnam commented 8 years ago

I had to make commit f5ec5c7 to fix compilation under MSYS2. It also makes the include order more logical/sane. I would prefer MSVC play nice with it. What is the first error you get with f5ec5c7 in place?

LancePutnam commented 8 years ago

I just pushed a new 'c++11' branch that you may want to try out if MSVC has C++11 support. I've switched out with which might help fix the remaining errors.

LancePutnam commented 8 years ago

That should be "... switched out math.h with cmath ...". Auto-markdown stripped out the < and > characters!

mhetrick commented 8 years ago

Switching to the C++11 branch fixes all compilation errors on MSVC 2013 and 2015.

LancePutnam commented 8 years ago

Fantastic. I will version tag devel where it's currently at and then merge in c++11.

mhetrick commented 8 years ago

I should add that I believe that you still need the updated pstdint.h for MSVC 2015. I'll double check if it still compiles using only and the old pstdint.h. Regardless, the new file doesn't seem to do any harm.

LancePutnam commented 8 years ago

Okay, I'll just merge in the new pstdint.h now since I want to do a bit more testing in the c++11 branch.