SOLVED glfwPollEvents(); not recognised

Hi, I am trying to use ofxCanon from @elliotwoods , particularly as it will let me adjust the camera settings. I am using the master branch of openframeworks pulled today as I am using some new features.

In the takephoto method when I compile for VS 2015 I get

glfwPollEvents(); is not recognised.

Is there something I need to do to get access to the glfw calls?

Is not recognised?
Can you post a screenshot of your error?

Also consider using the issues on ofxCanon github

Hi, cheers, here is a screen shot, if I comment out glfwPollEvents() and use takePhotoAsync everything compiles fine, I can also call takePhoto(), but it crashes directly after capture.

I did not go to the git issues as I was unsure what the source of the problem was.

Very strange
I wonder if recent oF versions dropped glfw?

Please consider adding an include At the top of the file
#include <GLFW/glfw3.h>

we are still using glfw but we cleaned the includes from headers so you probably just need to explicitly include glfw as @elliotwoods suggests

I had similar issues with glm.
Does that mean that if we want to use an API from a library included in OF (but not an OF API) then we have to include its header?
Isn’t it better to have access to all APIs that OF makes use of?
Is this change brought in order to shorten compile time?

Sorry too many questions, but its basically all the same :slight_smile:

glm should be included by default, at least the most commonly used parts. and yes we removed most headers cause it was making compilation and auto complete terribly slow

1 Like

#include <GLFW/glfw3.h>

Fixes it.

Cheers everyone.