The problem, then, maybe that you have NO the openGL library ?
what video card do you use ?
when you say -lGL, it means “link that with the file libGL.so”, the file beeing looked for in every path listed in /etc/ld.so.conf.
So, do you have that file ?
I suppose at least that the -lm get rid of the complaints about sin, cos, etc… ?
Hi
I have the file libGL.so in \usr\lib. But I don’t know whether the path is listed in \etc\ld.so.conf. How to check it?
By the way my video card is ATI Rage Pro AGP(according to windows). But Linux 7.2 detected as ATI Mach-64.
I didn’t installed any special opengl files. But in windows i downloaded opengl header files, dll files etc. Do I have to do something like that for linux?
I checked in lib directory and there is a seperate directory for GL.
I don’t know whether i have to install special display drivers for opengl in linux.
Now I am totally confused.
Simon
Originally posted by rixed:
[b]The problem, then, maybe that you have NO the openGL library ?
what video card do you use ?
when you say -lGL, it means “link that with the file libGL.so”, the file beeing looked for in every path listed in /etc/ld.so.conf.
So, do you have that file ?
I suppose at least that the -lm get rid of the complaints about sin, cos, etc… ?[/b]
nah a.out is just the default output name from the compiler.
gcc myprog.cpp -o myprog
or whatever.
Use a makefile, it will simplify your life alot. You can add all your paths in the makefile rather than set your paths in the conf file if you so wish. Ask someone for a simple Linux one and hack it as you need.
The reason you needed ./a.out rather than a.out is because by default many Linux implementations do not search the current directory. Using ./ in front of it explicitly stated that a.out was in the current directory, and thus it was able to find the binary to execute.
But I haven’t used any math functions. Using glVertex i drew a square. that’s all. no calculation, nothing.
I couldn’t understand why i should -lm. I’m wondering whether opengl uses math functions internally?
Any idea guys?
Anyway finally i got a clear picture of what and how different files are linked during compilation.