Answer the question
In order to leave comments, you need to log in
Why does undefined reference occur?
Hello
I downloaded the binary files of the glut library, included the glut.h header file and specified qmake LIBS += -l glut32
(the library in the source folder), but the linker gives an undefined reference error. The assembler finds the library itself, please tell me what could be the matter
Answer the question
In order to leave comments, you need to log in
The prize of the shitcode of the year is yours unambiguously, and the problem is that the variables x and y are defined before the click is processed and then do not change, and even the fact that you change the variables num and numm will not give you anything, since x and y will remain the same. Here you are constantly adding the same variables to your transform
ps the name of the library has changed
g++ main.cpp -o main.exe -lglfw3 //Компиляция происходит без проблем, а линковка дает ошибки
#include "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;
}
undefined reference to `[email protected]'
opengl32 pops up during linking .a must be placed in project\libsDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question