This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Linking with libX11.a and libXt.a
- To: cygwin-xfree at cygwin dot com
- Subject: Linking with libX11.a and libXt.a
- From: Adam Stallard <adam at aspen dot mine dot nu>
- Date: Mon, 01 Oct 2001 18:20:57 -0600
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