Undefined references
Hi there,
I''m trying to use the XF86VidMode extensions and it is driving me insane! I always get undefined references, although I link the correct(?) libraries.
My linkstage looks something like this:
colorgcc -L/usr/X11R6/lib -lGL -lGLU -lXext -lX11 -lXxf86vm CGfxDriverGLX.o -shared -o libGfxDriverGLX.so
After I try to load the lib, it gives me "Undefined symbol: XF86VidModeGetModeLine" etc.
I''m using an unstable Debian, updated yesterday..
.entrox
.entrox
You might want to double check if you have prototyped
it properly, did you include:
#include
Were you able to tell which dependancy was unable to load
the library? Was it the library that you were compiling or
the application linking to a library that you compiled
that was linked to libXxf86vm?
it properly, did you include:
#include
Were you able to tell which dependancy was unable to load
the library? Was it the library that you were compiling or
the application linking to a library that you compiled
that was linked to libXxf86vm?
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
Ooops, didn''t know it parsed html. Let me try something:
#include <X11/extensions/xf86vmode.h>
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
Well,
I found the reason why it wasn''t linking properly. The passed commandline was partially wrong. Instead of
colorgcc -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm -lX11 CGfxDriverGLX.o -shared -o libGfxDriverGLX.so
it should have been
colorgcc CGfxDriverGLX.o -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm -lX11 -shared -o libGfxDriverGLX.so
Funny thing is, both produce a valid library. Only the XF86VidMode funcs were unresolved, the other ones (GL, X11 ...) were resolved properly.
LearFox: I was linking libXxf86vm.a to a dynamic library, which gets loaded from my main application (which has no clue about X11 or other such things). It also compiles fine and produces the desired library, but when I try to load it, dlopen() fails and gives an ''unresolved symbol'' error.
.entrox
I found the reason why it wasn''t linking properly. The passed commandline was partially wrong. Instead of
colorgcc -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm -lX11 CGfxDriverGLX.o -shared -o libGfxDriverGLX.so
it should have been
colorgcc CGfxDriverGLX.o -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm -lX11 -shared -o libGfxDriverGLX.so
Funny thing is, both produce a valid library. Only the XF86VidMode funcs were unresolved, the other ones (GL, X11 ...) were resolved properly.
LearFox: I was linking libXxf86vm.a to a dynamic library, which gets loaded from my main application (which has no clue about X11 or other such things). It also compiles fine and produces the desired library, but when I try to load it, dlopen() fails and gives an ''unresolved symbol'' error.
.entrox
.entrox
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement