Hi:

Just tried porting an app that I wrote back in 94 on SCO Zenix.  This app has
been successfully ported to SCO Unix, and HP-UX.  It is a straight Xlib C
application.  I copied the source to my Linux box and ran the cc on it.  Every
Xlib function failed because the compiler claimed that it was not declared.  I
opened the X11/XLib.h file and checked them out, all were declared (defined) as
normal. 

To verify things, I wrote this short program and cc'd it on my old 386 SCO UNIX
box, it went well.  Then I cc'd it on my Linux box.  I have included the error
message from cc.  My question is this:  Is X supported on Linux for application
development outside of the KDevelopment environment.

=================================
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>

int main(void)
{
        char sz[1024];
        Display* pDisplay = NULL;
        pDisplay = XOpenDisplay(NULL);
        scanf("%s",sz);
}
=================================
[herman@vcamdev1 herman]$ cc xtest.c
/tmp/ccZmVDzJ.o: In function 'main':
/tmp/ccZmVDzJ.o(.text+0x19): undefined reference to 'XOpenDisplay'
collect2: ld returned 1 exit status
==================================

Any explanitions

Reply via email to