I’m trying to run the openGLAppTutorial but I get two type of errors in VS2019:
- All functions beginning with glSomething are not recognized
- namespace ::juce::gl is not found.
I’m not sure if it is a matter of configuring my VS or pc with those libraries or a juce version problem or a juce module problem.
I think I have OpenGL 4.6 installed also OpenGL works if I create an empty project in VS using glut.h for example.
Are you missing a module in projucer?
Looks like it is all there. I also checked that the path for VS for those modules is set correctly. I downloaded the project zip file directly from the tutorial page, so i guess all resources/modules etc should be there already.
I’ve tried to reproduce what you’re seeing here by downloading the zip, unzipping to a directory and opening with projucer before using that to open the project in VS2019, and it all worked ok.
The only thing that I have likely done differently to you is include a version of JUCE 6 as a directory within the project and pointed the modules at that folder. Whilst this is not strictly necessary*, it may be worth a try.
Just move to the project directory and git clone JUCE there. Then use the projucer from that folder to open the .jucer and then change the modules in the project to all point at the modules folder in that copy of Juce.
*It’s important if you have a number of team projects that are each on a different versions of JUCE.
I tried both, using the global path and manually re-inserting the path for juce modules. Nothing. Is that any different to copying Juce files in the project folder and then manually indicating the path to retrieve modules?
Could it be related to the fact I use Juce 6.0.5?
Yes, I inherited an older project and the OpenGL namespace was changed between versions.
Yes it seems to be an issue related to juce version. In my older one I can find all those functions in openGLContext.extensions.glSomething();
The change from
juce::gl:: was done somewhen in the mid of JUCE 6 here: