executable - Code Blocks output doesn't execute linux -


i pretty new linux , wanted try make small opengl program test. i'm using glfw , made easy test:

    #include <iostream>     #include <gl/glew.h>     #include <glfw/glfw3.h>      using namespace std;      int main()     {         if (!glfwinit())         {             return -1;         }         glfwwindow *window = glfwcreatewindow(800, 600, "het werkt", null, null);         if (!window)         {             glfwterminate();         }         glfwmakecontextcurrent(window);          while (!glfwwindowshouldclose(window))         {             glfwpollevents();             glfwswapbuffers(window);         }     } 

now if try run in code::blocks itself, runs fine, debug, release, doesn't matter, works. when try execute outside code::blocks, goes wrong. if double click executable nothing happens, , if ./executablename in terminal gives me error:

    error while loading shared libraries: libglfw.so.3: cannot open shared object file: no such file or directory 

all of libs in same directory executable, don't why gives error.

by way i'm working on linux mint.

thanks in advance help!

you should place libraries in $path. issue echo $path command , see if can find libraries in there (within paths) - if not, have put them in there someway. i'm not sure if can copy-paste libraries in there, may want search them using linux distribution's package management system. using linux mint, maybe try searching sudo aptitude search glfw , try installing corresponding packages.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -