Skip to main content

Thread: How to get started with OpenGL on Linux with C++?


hi,
have tried running 1st opengl program , receive error: permission denied.


1. setup opengl linux mint mate i:
linux > terminal > (go folder store new file. e.g.: /media/all files) > touch basicglut.cpp > nano basicglut.cpp > (enter code , save file) > g++ basicglut.cpp -o basicglut -lglut -lgl > ./basicglut > permission denied.
tried g++ basicglut.cpp -lgl -lglu -lglut -lm -o basicglut > permission denied.




2. setup opengl linux mint mate netbeans 7.3 c++ i:
install opengl linux: url
linux > terminal > sudo apt-get update
linux > terminal > sudo apt-get install libgl1-mesa-dev
linux > terminal > sudo apt-get update
linux > terminal > sudo apt-get install build-essential
linux > terminal > sudo apt-get install libglew1.5-dev freeglut3-dev libglm-dev
glxinfo | grep opengl


install netbeans: url
download netbeans: url
download > terminal > go downloads folder downloaded netbeans file > chmod +x netbeans-7.3-linux.sh > ./netbeans-7.3-linux.sh > netbeans.


netbeans has problems like:
mouse click doesn't hold submenu's ribbon menu file etc...
compile gives errors:
make[2]: *** [dist/debug/gnu-linux-x86/text_book_page_46] error 1
make[2]: leaving directory `/media/all files/text book page 46'
make[1]: *** [.build-conf] error 2
make[1]: leaving directory `/media/all files/text book page 46'
make: *** [.build-impl] error 2
build failed (exit value 2, total time: 375ms)




here code i'm using:
// #include <gl/glut.h> // might need change linux, example mac.
#include <gl/gl.h>
#include <gl/glut.h>


void render(void);


int main(int argc, char** argv)
{
glutinit(&argc, argv);
glutinitdisplaymode(glut_depth | glut_double | glut_rgba);
glutinitwindowposition(100, 100);
glutinitwindowsize(640, 480);
glutcreatewindow("simple glut application");


glutdisplayfunc(render);


glutmainloop(); // says process has finished , can start rendering.
}


void render(void)
{


}

do a:
code:
ls -l basicglut.cpp
and
code:
ls -l basicglut
inside directory containing basicglut.cpp , post result. sounds permissions issue.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Packaging and Compiling Programs How to get started with OpenGL on Linux with C++?


Ubuntu

Comments

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP