This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Linking with libX11.a and libXt.a


Hi,

I've been able to compile my X-Windows programs using the dynamic
libraries only, such as libX11.dll.

I would like to to be able to use static forms if possible, especially
since the Xt library does not come with cygwin/XFree in the dynamic
form.

Here is an example:

#include <X11/Xlib.h>

int main(){
    XOpenDisplay(NULL);
}

This compiles with:  (uses libX11.dll)

gcc -L/usr/X11R6/bin -lX11 xtest.c

but if I use:  (uses libX11.a)

gcc -L/usr/X11R6/lib -lX11 xtest.c

ld returns an undefined reference to XOpenDisplay

If someone could enlighten me on how I should be using gcc for cygwin to
make this work, that would be great.

Thanks a lot!

Adam Stallard




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]