From: David E. <de...@us...> - 2007-12-07 16:47:06
|
Reg wrote: > As you suspected, the following:- > > #htcobol -v -x /TinyCat/DEGRABBER.COB > as -o DEGRABBER.o DEGRABBER.s > gcc -o DEGRABBER DEGRABBER.o -L/usr/local/lib -lhtcobol > -ldl -ldb -lncurses -lm > DEGRABBER.o: In function `DEGRABBER': > DEGRABBER.COB:(.text+0x662): > undefined reference to `tcob_read_next_seq' > ... > collect2: ld returned 1 exit status Since there is no error message '/usr/bin/ld: cannot find -lhtcobol', then it must be another version of the TC RTL, not version 0.63.87. Check the 'develoment/lib' directory to see if the RTL compiled properly (check for a file called libhtcobol.a). If the library file exists, run the following, manually. #htcobol -v -c /TinyCat/DEGRABBER.COB as -o DEGRABBER.o DEGRABBER.s #gcc -o DEGRABBER DEGRABBER.o -L/somepath/development/lib -lhtcobol \ -ldb -lncurses -ldl -lm Here the 'somepath' is the location where the TC source code is located. If the compilation succeded, check that all libraries are found. #ldd DEGRABBER > ... > Sorry, last two lines should have read:- > find / -name db1 -print > /usr/include/db1 > > i.e. db1 is installed, and so is db4 > For some reason, the linker cannot find db1 (or db4 if it is > substituted). > The htcobol config had no entry for --with-libdb= > Could it be that the OS is Fedora rather than RedHat? > Just downloaded the RPM, didn't compile from source for > the development version. All RPM based sytems have multiple versions of BDB installed. They also use soft links, making it difficult to determine which library is actually used when '-ldb' is used in a link step. TC uses the BDB 1.85 API, which is supported in all versions of BDB, up to (and including) 4x (4.4 I think). In any case the 'configure' script checks what is installed and if it works. So if the 'configure' step worked, don't worry about it for the time being. Hope this helps. Cheers |