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

Compilation errors due to C++11 #2

Open
mattrei opened this issue Aug 5, 2015 · 2 comments
Open

Compilation errors due to C++11 #2

mattrei opened this issue Aug 5, 2015 · 2 comments

Comments

@mattrei
Copy link

mattrei commented Aug 5, 2015

Hi Joseph,

I get the following compilation error below. Using g++ version 4.9. Tried to activate c++11 features however then the other addons won't compile.

Can you give some instructions with what flags you compile this plugin?

Thanks,
Matthias

src/ofApp.cpp:129:21: error: ISO C++ forbids declaration of ‘it1’ with no type [-fpermissive]
     for(auto const &it1 : uniforms) {
                     ^
src/ofApp.cpp:129:27: error: range-based ‘for’ loops are not allowed in C++98 mode
     for(auto const &it1 : uniforms) {
                           ^
src/ofApp.cpp:130:33: error: request for member ‘first’ in ‘it1’, which is of non-class typeconst int’
         shader.setUniform1f(it1.first, uniforms[it1.first]);
                                 ^
src/ofApp.cpp:130:53: error: request for member ‘first’ in ‘it1’, which is of non-class typeconst int’
         shader.setUniform1f(it1.first, uniforms[it1.first]);
                                                     ^
@josephwilk
Copy link
Owner

Hmm.... Let me see I can fix that. I build everything through xcode at the moment so it does all the flag magic.

@mattrei
Copy link
Author

mattrei commented Aug 10, 2015

Sweet.
If I add the c++11 flag it tries also to compile the oF plugins with the new standard and that produces a bunch of other errors.
However (for such and similar reasons) my knowledge of c++ is quite limited.

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

2 participants