1 pièce(s) jointe(s)
Probleme de compilation sous netBeans
Bonjour,
Je suis sous windows et j'utilise l'IDE : netBeans.
j'ai suivie ce tuto à la lettre :
https://opengl.developpez.com/tutori...e=hello-window
mon code source :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| #include <GLFW/glfw3.h>
#include <glad/glad.h>
#include <cstdlib>
/*
*
*/
int main(int argc, char** argv) {
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
return 0;
} |
Or, une erreur apparait lors de la compilation :
Citation:
cd 'D:\Users\vince\Documents\code\c++\OpenGL_test'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/d/Users/vince/Documents/code/c++/OpenGL_test'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/opengl_test.exe
make.exe[2]: Entering directory `/d/Users/vince/Documents/code/c++/OpenGL_test'
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/opengl_test build/Debug/MinGW-Windows/main.o -s
build/Debug/MinGW-Windows/main.o: In function `main':
D:\Users\vince\Documents\code\c++\OpenGL_test/main.cpp:25: undefined reference to `glfwInit'
D:\Users\vince\Documents\code\c++\OpenGL_test/main.cpp:26: undefined reference to `glfwWindowHint'
D:\Users\vince\Documents\code\c++\OpenGL_test/main.cpp:27: undefined reference to `glfwWindowHint'
D:\Users\vince\Documents\code\c++\OpenGL_test/main.cpp:28: undefined reference to `glfwWindowHint'
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/opengl_test.exe] Error 1
make.exe[2]: Leaving directory `/d/Users/vince/Documents/code/c++/OpenGL_test'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/d/Users/vince/Documents/code/c++/OpenGL_test'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
j'ai (normalement) bien ajouter les include nécessaire :
Pièce jointe 593595
Je suis ouvert à toute aide éventuelle.
En vous remerciant.