[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[opendx-dev] Re: Problems with linking OpenDX samples under RH9



Dear all,

The problem has been solved with the help of Irek. Irek and I think it 
is worth writing an email to explain what we have done because someone 
else may encounter the same problem.

The  reason of the linking error is probably because of the 
inconsistency between different versions of GCC as suggested by Irek. So 
after rebuliding the OpenDX source code using my own compiler, 
samples/callmodule/Simple.c was successfully compiled.

When executing "Simple", I got the following two errors:

*************************
Simple: error while loading shared libraries: libDXcallm.so.4: cannot 
open shared object file: No such file or directory
****************************
This is solved by copying dx/lib_linux/* to usr/lib.

**********************
0: Import: Bad parameter: cannot open file 'cloudwater' in current 
directory or DXDATA path
Segmentation fault
**********************
The data file cloudwater.dx is in dx/samples/data. "Simple" worked after 
copying across it to the callmodule/.

Jian




Jian Chen wrote:

>Hi there,
>
>I am a newbie in OpenDX. What I want to do is to compile and link
>samples/callmodule/Simple.c under Redhat 9. But got the following error
>messages.
>
>************************************************
>gcc -I/usr/local/dx/include -g -O2 -Wall -g -O2 -I/usr/X11R6/include
>-D_GNU_SOURCE -o Simple Simple.c -L/usr/local/dx/lib_Linux -lDX
>-lDXcallm -lnsl  -lnetcdf -lcdf -ldf -lXpm -ldl -lXm -lXp -lGLU -lGL
>-L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib -lMagick -ljbig -ltiff
>-lfreetype -ljasper -ljpeg -lpng -ldpstk -ldps -lXt -lXext -lSM -lICE
>-lX11 -lbz2 -lxml2 -lz -lpthread -lm
>Simple.c:7: warning: return type defaults to `int'
>Simple.c:13: warning: return type defaults to `int'
>/tmp/ccOPxIN2.o(.text+0x30): In function `main':
>/usr/local/dx/samples/callmodule/Simple.c:20: undefined reference to
>`DXInitModules'
>/tmp/ccOPxIN2.o(.text+0x3f):/usr/local/dx/samples/callmodule/Simple.c:23:
>undefined reference to `DXRegisterInputHandler'
>/tmp/ccOPxIN2.o(.text+0x58):/usr/local/dx/samples/callmodule/Simple.c:26:
>undefined reference to `DXModSetStringInput'
>/tmp/ccOPxIN2.o(.text+0x73):/usr/local/dx/samples/callmodule/Simple.c:28:
>undefined reference to `DXModSetObjectOutput'
>/tmp/ccOPxIN2.o(.text+0x85):/usr/local/dx/samples/callmodule/Simple.c:29:
>undefined reference to `DXCallModule'
>/tmp/ccOPxIN2.o(.text+0xa2):/usr/local/dx/samples/callmodule/Simple.c:36:
>undefined reference to `DXModSetObjectInput'
>/tmp/ccOPxIN2.o(.text+0xbb):/usr/local/dx/samples/callmodule/Simple.c:37:
>undefined reference to `DXModSetFloatInput'
>/tmp/ccOPxIN2.o(.text+0xd0):/usr/local/dx/samples/callmodule/Simple.c:38:
>undefined reference to `DXModSetObjectOutput'
>/tmp/ccOPxIN2.o(.text+0xe2):/usr/local/dx/samples/callmodule/Simple.c:39:
>undefined reference to `DXCallModule'
>/tmp/ccOPxIN2.o(.text+0xfb):/usr/local/dx/samples/callmodule/Simple.c:47:
>undefined reference to `DXReference'
>/tmp/ccOPxIN2.o(.text+0x10f):/usr/local/dx/samples/callmodule/Simple.c:48:
>undefined reference to `DXModSetObjectInput'
>/tmp/ccOPxIN2.o(.text+0x124):/usr/local/dx/samples/callmodule/Simple.c:49:
>undefined reference to `DXModSetObjectOutput'
>/tmp/ccOPxIN2.o(.text+0x136):/usr/local/dx/samples/callmodule/Simple.c:50:
>undefined reference to `DXCallModule'
>/tmp/ccOPxIN2.o(.text+0x14f):/usr/local/dx/samples/callmodule/Simple.c:54:
>undefined reference to `DXModSetObjectInput'
>/tmp/ccOPxIN2.o(.text+0x163):/usr/local/dx/samples/callmodule/Simple.c:55:
>undefined reference to `DXModSetObjectInput'
>/tmp/ccOPxIN2.o(.text+0x175):/usr/local/dx/samples/callmodule/Simple.c:56:
>undefined reference to `DXCallModule'
>/tmp/ccOPxIN2.o(.text+0x18a):/usr/local/dx/samples/callmodule/Simple.c:61:
>undefined reference to `DXDelete'
>/tmp/ccOPxIN2.o(.text+0x1ae):/usr/local/dx/samples/callmodule/Simple.c:68:
>undefined reference to `DXCheckRIH'
>collect2: ld returned 1 exit status
>make: *** [Simple] Error 1
>
>**************************************************
>
>I got confused because I think the missing routines (e.g.
>DXInitModules, DXCAllModule etc.) should have been defined in libDX and
>libDXcallm which were linked. I would really apprecite if anybody could
>help me.
>
>Thanks in advance.
>
>Jian
>
>  
>