openframeworks / openframeworks/openFrameworks
Build failure with clang-4.0: can't find glfwSetKeyCallback
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
It can't find this function in glfw-3.2.1 (the latest version) due to int/unsigned conflict:
/usr/ports/devel/openframeworks/work/openFrameworks-0.9.8/libs/openFrameworks/app/ofAppGLFWWindow.cpp:301:2: error: no matching function for call to 'glfwSetKeyCallback'
glfwSetKeyCallback(windowP, keyboard_cb);
^~~~~~~~~~~~~~~~~~
/usr/local/include/GLFW/glfw3.h:3307:20: note: candidate function not viable: no known conversion from 'void (GLFWwindow *, int, int, unsigned int, int, int)' to 'GLFWkeyfun'
(aka 'void (*)(GLFWwindow *, int, int, int, int)') for 2nd argument
GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun);
^
openframeworks-0.9.8 on FreeBSD-11.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at libs/openFrameworks/app/ofAppGLFWWindow.cpp:301 and compare the keyboard callback passed to glfwSetKeyCallback with the GLFWkeyfun declaration in /usr/local/include/GLFW/glfw3.h. Reproduce the openFrameworks 0.9.8 build on FreeBSD 11.1 with clang-4.0; done means the project compiles without this callback type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100