josephwilk / shaderview

Light show for live coding
MIT License
78 stars 1 forks source link

Compilation errors due to C++11 #2

Open mattrei opened 9 years ago

mattrei commented 9 years ago

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 type ‘const 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 type ‘const int’
         shader.setUniform1f(it1.first, uniforms[it1.first]);
                                                     ^
josephwilk commented 9 years ago

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

mattrei commented 9 years ago

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.