User forums > Help

Trying to set up glad with glfw3 in Code::Blocks, beginner, please help!

<< < (2/2)

Wkerry:
Tim,

Have a read of the https://www.reddit.com/r/opengl/comments/1py7xbz/cant_seem_to_get_glad_to_work_in_codeblocks/ thread to see what people have already asked and the response as it may save you time and effort.

stahta01:
The last two posts in this thread is a waste of bandwidth.

To the OP to build under Code::Blocks you need good [test/example] code to compile and you need to add the source files to the CB project.

Edit: The online script/wizard creates the glad/glad.h file and another source file that needs added to the CB project. Without those two files I cannot do anymore testing. I also need good test code the one I found has run-time issues.

Edit2: The OP needs to find the good test code and post the directions he used with the online wizard/web service for me to do anymore testing. And, if the OP can not post a build log it will be a waste of time for him to continue posting for directions on posting a build log read the CB FAQ on the CB Wiki page.

Edit3: The start of my build log which shows the commands used to build; the OP might get hints from this on the missing libraries that need added.


--- Code: ----------------- Build: Debug in glfw (compiler: GNU GCC Compiler)---------------

gcc.exe -Wall -g -IC:/msys64/ucrt64\include -IGL\include -c C:\devel\test\glfw\GL\src\gl.c -o obj\Debug\GL\src\gl.o
g++.exe -Wall -g -IC:/msys64/ucrt64\include -IGL\include -c C:\devel\test\glfw\main.cpp -o obj\Debug\main.o
g++.exe -LC:/msys64/ucrt64\lib -o bin\Debug\glfw.exe obj\Debug\GL\src\gl.o obj\Debug\main.o   -lglfw3 -lopengl32 -lglu32 -lgdi32
C:\devel\test\glfw\main.cpp: In function 'int main()':
C:\devel\test\glfw\main.cpp:42:10: warning: the address of 'void (* glfwGetProcAddress(const char*))()' will never be NULL [-Waddress]
   42 |     if (!GLADuserptrloadfunc((GLADloadfunc)glfwGetProcAddress)) {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\devel\test\glfw\main.cpp:2:
C:/msys64/ucrt64\include/GLFW/glfw3.h:6290:20: note: 'void (* glfwGetProcAddress(const char*))()' declared here
 6290 | GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname);
      |                    ^~~~~~~~~~~~~~~~~~
Output file is bin\Debug\glfw.exe with size 302.21 KB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 1 warning(s) (0 minute(s), 1 second(s))
 
-------------- Run: Debug in glfw (compiler: GNU GCC Compiler)---------------

Checking for existence: C:\devel\test\glfw\bin\Debug\glfw.exe
Set variable: PATH=.;C:/msys64/ucrt64\lib;C:\msys64\mingw64\bin;C:\msys64\mingw64;C:\msys64\ucrt64\bin;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\msys64\usr\bin\site_perl;C:\msys64\usr\bin\vendor_perl;C:\msys64\usr\bin\core_perl
Executing: "C:\msys64\ucrt64\bin/cb_console_runner.exe" "C:\devel\test\glfw\bin\Debug\glfw.exe"  (in C:\msys64\ucrt64\bin)
Process terminated with status -1073741819 (0 minute(s), 8 second(s))

--- End code ---

Tim S.

Navigation

[0] Message Index

[*] Previous page

Go to full version