Am trying to solve this problem that unfortunately has surfaced in my program. My program is to start an OpenGl platform, but then I launch it I get the error:
C:\...\glfw_opengl\xtoll\src\include\eglew.h:106:29: fatal error: KHR/khrplatform.h: No such file or directory
Now admittedly operator error is mostly to blame. I copied some includes to a more "organized" folder hierarchy without bringing along its dependencies (in this case khrplatform). Or so I thought: I've made the file universally available<KHR/khrplatform.h> and the compiler still can't find it.
It's the preprocessor's job to find that file while processing the translation unit (...which is then given to the compiler.) I'm not sure what the GUI looks like, but you need to point the preprocessor to your file using the -I option:
Thank you, now its not reporting the same error, reason being: IDK. Instead, something went right. I reverted back to including where the files were rather than gathering and moving them, I righted the dependency issue that would otherwise have resurfaced with khrplatform.
Remember that the build process for most components is a three-stage process involving preprocessing, compilation and linking. This error comes from the linker stage (the program name is ld), so that implies that both the compilation and pre-processing steps have succeeded.
This particular issue is that the linker can't find a definition for the symbols named in the error messages. This means usually that you did not link whatever object code (libraries, etc.) that contain that definition.
You would need -lgdi32 to instruct the linker to link that library. System libraries should be in the search path by default, but if not, you can fix that with -L path basically as you did with -I for the include search path.
Will apply it and see. It begs the question why the system file isn't linked/ found in the first place or causing an error or whatever: in all of the internet I haven't seen many discussions about this type of linker error and opengl/GLFW.