Hi,
I am pretty new with OpenDX. I install and run OpenDX on an Intel/Linux
cluster running RedHat6.2. I was able to run some examples using the GUI
but I run into problems when I try to use the script mode. I was unable
to find a Makefile for Linux so I adapted one and I got a lo-o-ong list
with link time errors:
/usr/local/dx/lib_linux/libDX.a(lbdisplayx.o): In function
`getStaticColorTranslation':
lbdisplayx.o(.text+0x128de): undefined reference to `XImageByteOrder'
/usr/local/dx/lib_linux/libDX.a(lbdisplayx.o): In function `setColors':
lbdisplayx.o(.text+0x12df8): undefined reference to `XStoreColors'
Here is what I did. I got the hello.c from dx/examples:
#include <dx/dx.h>
Error m_Hello(Object *in, Object *out)
{
char message[30], *greeting;
if (!in[0])
sprintf(message,"hello world");
else {
DXExtractString(in[0],&greeting);
sprintf(message,"%s %s", "hello", greeting);
}
out[0] = (Object)DXNewString(message);
return OK;
}
applied mdf2c: "mdf2c hello.c > userhello.c" and compiled hello.c and
userhello.c:
gcc -O -Dlinux -I/usr/local/dx/include -c hello.c -o hello.o
gcc -O -Dlinux -I/usr/local/dx/include -c userhello.c -o userhello.o
I used the following command for link that didn't work:
gcc -O -Dlinux -I/usr/local/dx/include hello.o userhello.o
-L/usr/local/dx/lib_linux -L /usr/X11R6/lib -lDX -lDXL -lDXcallm -o
dxexec
As far I understand I am missing some libraries. I tried to track one
link time error, e.g.
/usr/local/dx/lib_linux/libDX.a(mgwidget.o)(.text+0x1142e): more
undefined references to 'XTextWidth' follow
but was unable to find out where XTextWidth module resides. What I am
missing? Can somebody tell me where to find or how to generate a
Makefile appropriate for my configuration? I browsed the mail archive
but didn't find answer to my questions.
Thanks in advance,
Ted