Problems with GLFW include directory (C program)

Two C programs using GLFW 3.3.8
Two C programs with the same headers and linker inputs.
d:\code\font_test.c

Program font_text.c - when compiled gets error message
E1696 cannot open source file “GLFW\glfw3.h”

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define GLFW_INCLUDE_GLU
#include <GLFW\glfw3.h>
Note: #include is underlined in red. (WHY)

Additional Include Directories D:\code\glfw3.3.8\include

Linker inputs (same for both programs)
D:\Code\glfw-3.3.8\lib-vc2022\glfw3dll.lib;opengl32.lib; glu32.lib; odbc32.lib; odbccp32.lib


Program glfw_test.c - compiles, links and runs OK

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define GLFW_INCLUDE_GLU
#include <GLFW/glfw3.h>
Note: #include is NOT underlined in red.
Additional Include Directories D:\code\glfw3.3.8\include

Linker inputs
D:\Code\glfw-3.3.8\lib-vc2022\glfw3dll.lib;opengl32.lib; glu32.lib; odbc32.lib; odbccp32.lib

I assume this is in Visual Studio? I assume you put the include path wrongly, either some typo or for wrong configuration/platform setting. Please check more carefully. Otherwise there should be no reason to show any errors for same path in different projects.

Yes, VS 2022. I have triple checked for typos. Found none.

Are you sure you’re changing properties for same configuration/platform you selected to build?

Like are these things matching?

Can you show screenshot of C/C++ → ComandLine window?

Your own test program has problems.

Using VC 2022 latest version Version 17.4.4 64 bit
Command line to compiler
/JMC /permissive- /ifcOutput “x64\Debug" /GS /W3 /Zc:wchar_t /I"d:\code\glfw3.3.8\include” /ZI /Gm- /Od /sdl /Fd"x64\Debug\vc143.pdb" /Zc:inline /fp:precise /D “_DEBUG” /D “_CONSOLE” /D “_UNICODE” /D “UNICODE” /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /FC /Fa"x64\Debug" /EHsc /nologo /Fo"x64\Debug" /Fp"x64\Debug\gtest.pch" /diagnostics:column

Command line to linker
/OUT:“D:\Code\oglfontlib\gtest\x64\Debug\gtest.exe” /MANIFEST /NXCOMPAT /PDB:“D:\Code\oglfontlib\gtest\x64\Debug\gtest.pdb” /DYNAMICBASE “D:\Code\glfw-3.3.8\lib-vc2022\glfw3dll.lib” “opengl32.lib” “glu32.lib” “odbc32.lib” “odbccp32.lib” “kernel32.lib” “user32.lib” “gdi32.lib” “winspool.lib” “comdlg32.lib” “advapi32.lib” “shell32.lib” “ole32.lib” “oleaut32.lib” “uuid.lib” /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:“D:\Code\oglfontlib\gtest\x64\Debug\gtest.pgd” /SUBSYSTEM:CONSOLE /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /ManifestFile:“x64\Debug\gtest.exe.intermediate.manifest” /LTCGOUT:“x64\Debug\gtest.iobj” /ERRORREPORT:PROMPT /ILK:“x64\Debug\gtest.ilk” /NOLOGO /TLBID:1

Source:
#include <GLFW/glfw3.h>

int main(void)
{
GLFWwindow* window;

/* Initialize the library */
if (!glfwInit())
    return -1;

/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow( 640, 480, "Hello World", NULL, NULL );
if (!window)
{
    glfwTerminate();
    return -1;
}

/* Make the window's context current */
glfwMakeContextCurrent(window);

/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window))
{
    /* Render here */
    glClear(GL_COLOR_BUFFER_BIT);

    /* Swap front and back buffers */
    glfwSwapBuffers(window);

    /* Poll for and process events */
    glfwPollEvents();
}

glfwTerminate();
return 0;

}

Create this as an empty project.

Think I have found issue glfw-3.3.8 vs glfw3.3.8

Oops, Still not fixed

If you are continuing to have problems with configuring Visual Studio to compile a GLFW program then I suggest you first check out this simple GLFW CMake starter, following the instructions on the readme.

Once you have this up and running you can either use this as a basis for your own program by changing the code in main.cpp, or you can look at the project settings to help guide you towards configuring Visual Studio.

I would assume you still have some kind of typo or files are not where you think they are.
Please open D:\code\glfw-3.3.8\include\glfw folder and show screenshot that it really has glfw3.h file inside it.

I was able to get a VS program GLFW_TEST testing GLFW and my font library to execute. Program required glfw3.dll to in the same directory as executable (a common problem) However, it would only work if I used lib-vs2022\glfw3dll.lib when compiling and linking.
what is the difference between glfw3dll.lib, glfw3.lib and glfw3.dll? Are all these 64 bit libraries? If I used the glfw3.lib or glfw3.dll VS said it could find these files even though I use the same path as glfw3dll.lib. Program works great with my font library just like it did with GCC mingw code blocks compiler and linker. Making progress.

glfw3.dll is dynamic library that contains glfw3 library code and anybody can use it to call functions in it.

glfw3dll.lib is import file for glfw3.dll dynamic library. It means glfw3dll.lib contains necessary information for linker to produce code that calls functions into glfw3.dll file - executable produced by linking with this .lib file will require glfw3.dll at runtime.

glfw3.lib is static library - which means it contains all the glfw3 code and if you pass it to linker, then linker will executable that will not need any glfw dll file at runtime, because all the glfw code will be compiled into exe itself.