Problem when compiling with SDL on Nvidia/Nforce...
The nvdia drivers are well installed on my machine, i can run glxinfo, glxgears and everything is fine, the problem is when i try to compile an application using SDL and Opengl (i am using Kdevelop), so i have added -lGL-lGLU -lSDL -lpthread (linker option) in order to the source to compile and link, no problem, but when i run the exe, i got the windows opened but no Opengl rendering functions seem to work, i just got a screen full of garbage (probably some video data from precendent application).
What's wrong ? Is that possible that some lib are not the right ones to link with ?
I am stuck, help.
P.S. i have attached the small source i do use for test
Wanted to add that :
when i do link with -lSDL, ldd does not show any reference to /usr/lib/libGL.so.1 and /usr/lib/libGLcore.so.1 as it should be (on Nvidia) ????
if i don't link with -lSDL then the linker will use that libraries, of course SDL is not use.
So i do suspect -lSDL to link with a kind of "static" wrong opengl lib at the link time, but i am just guessing.....
Does anyone have the same problem ?
Help is needed.
Hm... did you compile the SDL library you're using yourself (after you installed the nvidia-driver) or do you use a precompiled binary distribution of SDL?
Well, it came from a distribution redhat 7.3, but i found out the problem, i had to rename/delete some libgl and libglcore.a, then i ran again sdl-config --lib and i got new flags, now it does work.
So, some conflict between Nvidia Opengl and Mesa Opengl.
Thanks for answering.
|All times are GMT -5. The time now is 07:42 PM.|
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.