lmkamonitor.blogg.se

Cannot save main .cpp in codeblocks compiler
Cannot save main .cpp in codeblocks compiler







cannot save main .cpp in codeblocks compiler

These calls to the pkg-config tool can be directly added to your Makefile as well. Therefore, you need to use -lglfw instead of -lglfw3 and add two more libraries -lGLEW and -lGLU. In your case you need to link everything, which is needed by both GLFW3 and GLEW - so you should call the pkg-config two times: pkg-config -libs pkg-config -libs glew There is a standard way on Linux to get a correct set of libraries to link with your program - please look at man pkg-config. I cant get GLEW to work on netbeans in ubuntu 20.04 (C++) Here, you can see a screenshot which demonstrates that you have a linker tab where you can set up all this properly. Since you are using the Netbeans IDE, you will need to go to the project settings to set it up unless you edit the files in the background manually. Note that you will also need to add everything in the chain that comes up as a dependency when you start adding these, so based on your comment this is the whole chain to add: -L/usr/local/lib -lglfw3 -pthread -lGLEW -lGLU -lGL -lrt -lXrandr -lXxf86vm -lXi -lXinerama -lX11 You should have this set up for the linker: -lglfw3 The most probably reason is that you are not linking against the library, eventually. You are using symbols not present in the library (again, unlikely)

cannot save main .cpp in codeblocks compiler

You are not having the library installed (unlikely, based on your description) You are not linking against the library (most likely) There might be the following options for the failure: home/jan/NetBeansProjects/a/main.cpp:26: undefined reference to `glewInit' home/jan/NetBeansProjects/a/main.cpp:25: undefined reference to `glewExperimental' home/jan/NetBeansProjects/a/main.cpp:22: undefined reference to `glfwMakeContextCurrent' home/jan/NetBeansProjects/a/main.cpp:19: undefined reference to `glfwTerminate' home/jan/NetBeansProjects/a/main.cpp:16: undefined reference to `glfwCreateWindow' You are seeing linker errors in here: /home/jan/NetBeansProjects/a/main.cpp:12: undefined reference to `glfwInit' Your current include statements are wrong, and I am actually surprised how it passed the compilation process this way. This is my source (I didn't use this characters: in header files.): Can't compile easy source in C++ and OpenGL (GLFW) in Linux in NetBeans









Cannot save main .cpp in codeblocks compiler