Hi Pete, I really appreciate your comments. Thanks again.
Ted -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Peter Daniel Kirchner Sent: Wednesday, January 03, 2001 2:20 PM To: [email protected] Subject: Re: [opendx-users] link time errors Hi Ted, You're welcome. In this example you are building a new dxexec that contains your sample module. You would use libDXcallm.a if you were writing code that called dx modules (i.e. without dxexec) so you should leave libDXcallm.a out for building dxexec with the "hello" example module. Generally, dx doesn't require a lot of custom module writing, many users write none. Sometimes though there are things that custom code can do faster or in less memory, and when that is important you write a custom module. You can build custom modules in three forms 1) linked into dxexec, which is straightforward enough 2) runtime-loaded, allowing people to run your module without relinking their dxexecs, or 3) as outboard modules-- executables that communicate with dxexec through sockets. I would have to say that runtime loaded modules are the preferred mechanism. Pete Ted Sariyski wrote: > Hi Peter, > > I am sorry I didn't spell my problem clearer. After adding the libraries > the list of errors reduced dramatically. I got only a multiple > definition error, `_dxfemergency' was defined both in libDXcallm.a and > in libDX.a. I removed libDXcallm.a from the list and now the code > compiles fine. I just wonder may I forget for libDXcallm.a at all or > some other applications may need it? > > Thanks for your help. > Ted > > Peter Daniel Kirchner wrote: > > > > I'm slightly confused by your report so I am going to assume you mean you > > have some problem with script mode and some different problem building the > > sample .c files on linux. I'll try to answer the sample .c file issue. > > You're leaving out the X libraries, etc., hence the missing symbols. You > > may be able to plug in (more than one) of the following libraries and be > > fine: -lnsl -lMagick -ltiff -ljpeg -lpng -lz -ldl -lm -lSM -lICE -lXm -lXp > > -lGL -lm -lXext -lXt -lX11 -lSM -lICE -lpthread . > > > > Alternatively, the sample makefiles should be pretty much fixed in cvs > > (where there is no linux makefile-- the whatever.make file includes a file > > indicated by $ARCH ). > > > > If you try the alternative, > > http://www.research.ibm.com/dx/srcDownload/index.html lists the > > prerequisites for building dx. > > http://www.research.ibm.com/dx/cvs.html says how to get the source from cvs. > > > > hope this helps. > > Pete > > > > Ted Sariyski wrote: > > > > > 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 > > -- > Ted Sariyski > > Combustion Research and Flow Technology, Inc. > 174 North Main Street > Building 3, P.O.Box 1150 > Dublin, PA 18917 > Tel: (215) 249-9780 > Fax: (215) 249-9796 > [EMAIL PROTECTED] > [EMAIL PROTECTED]
