From: David E. <de...@us...> - 2007-12-12 14:37:19
|
Reg wrote: > ... followed your suggestion:- > #htcobol -v -c /TinyCat/DEGRABBER.COB > as -o DEGRABBER.o DEGRABBER.s > #gcc -o DEGRABBER DEGRABBER.o > -L/TinyCobol/development/lib -lhtcobol > -ldb -lncurses -ldl -lm No 'undefined reference ...' linkage error messages. Then one can assume that the correct version of the TC RTL was used. > #ldd DEGRABBER > linux-gate.so.1 => ... (0x00110000) > libdb-4.3.so => /lib/libdb-4.3.so (0x05479000) > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00a7c000) > libdl.so.2 => /lib/libdl.so.2 (0x00db4000) > libm.so.6 => /lib/libm.so.6 (0x00d8b000) > libc.so.6 => /lib/libc.so.6 (0x00c49000) > libpthread.so.0 => /lib/libpthread.so.0 (0x00dd7000) > .., /lib/ld-linux.so.2 (0x00c2c000) > > I'm not sure what this is telling me, except that it seems > to want libdb-4.3.so and I config'd htcobol without the db > option at all, never mind db4, so it should have defaulted to 1. The 'ldd' command shows the shared libraries dependencies and their location (if found), for binary DEGRABBER. Note that 'ldd' did not list '-lhtcobol' (libhtcobol.a), or any static library (archive) used in the link. In this case 'DEGRABBER' was linked with '/lib/libdb-4.3.so', meaning BDB 4.3. But the compile command used '-ldb', meaning that 'libdb.so' is a soft link to some other library or link. This is not a problem as the BDB 1.85 API is included in version 4.3. > Do you think I should clean the computer off and re-install > from scratch, as I have 4 htcobol implementations on it at > present? No UN*X is NOT MS windows, and a clean re-install should not be necessary. Well, unless you corrupted the RPM database (BDB). But the RPM utilities will usually prevent any one from doing so. You can have as many versions of TC installed as you wish. Managing this situation however can be problematic. How to remove TC from your system depends on how it was installed. If for example an RPM (DEB ...) was used, use the RPM utilities to un-install TC. If installed from source (... make install), then locate (whereis, find) and remove the binaries (htcobol, htcobrun), library and config directory. If both methods were used, this can be problematic as the integrity of the RPM database needs to be maintained. Maybe if both removal methods were used, RPM first. Personally, I usually have two versions (sometimes more) on my system. The current release, and the CVS version. Since I don't run any production programs, I usually do not install TC. If I do, I rename the binaries, library and config directory, to ensure no conflicts. I prefer to work with TC from some '/home/user/somepath' directory and set the environment variables (PATH, TCOB_OPTIONS_PATH, TCOB_RTCONFIG_PATH) make files as required. Anyway, hope this helps. Cheers. |