Compiling 4GL on Linux SUSE 6.4
Posted in 2001
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Hi experts, I'am trying to port my application on a Linux machine but I have some problems compiling my programs. When I compile a single sources, everything goes fine. example: c4gl -c sources.4gl -o sources.o --> this causes no problem But my sources.4ge program consists of different modules and libraries. When I compile this program, then I have a problem example: c4gl sources.o sources1.o library1.a library2.a -o sources.4ge. In this case he says undefined reference to `mg_error`. This mg_error function is situated in the library1.a file. On AIX all this works fine, so I suppose that there is an option to give at compilation time. Any Ideas Thanks, Danny
"Danny De Koster" <ddk@fidelity-soft.be> writes: > Any Ideas Informix apparently used RedHat Linux 5.2 to port 4GL-7.20. I don't have any familiarity with SUSE Linux. I'd assume at the very least that you should be using the egcs-1.0.3 compiler and glibc-2.0.7a for the libraries. On RedHat Linux 6.x you need to install the following compatibility packages: compat-{binutils,egcs,glibc,libs}-5.2*.rpm. On RedHat Linux 7.x, you are SOL because those packages aren't included in the 7.x CD sets (you can install them from a 6.x release, but there are a few "gotcha"'s, so I filed bugs #19283 and #19289 at <http://bugzilla.redhat.com/bugzilla/>). Does anyone know which version of RedHat Linux the 4GL-7.30 port was built on? -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412 Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142 President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B
Danny De Koster wrote in message <946nlv$1k09$1@rivage.news.be.easynet.net>... > >I'am trying to port my application on a Linux machine but I have some >problems compiling my programs. >When I compile a single sources, everything goes fine. > example: c4gl -c sources.4gl -o sources.o --> this causes no >problem > >But my sources.4ge program consists of different modules and libraries. >When I compile this program, then I have a problem > example: c4gl sources.o sources1.o library1.a library2.a -o >sources.4ge. > >In this case he says undefined reference to `mg_error`. This mg_error >function is situated in the library1.a file. >On AIX all this works fine, so I suppose that there is an option to give at >compilation time. > Some linkers keep a track of all library contents and can effectively re-search libraries, or know that a function is available from that library, so you can have circular references between libraries. Perhaps there is a linker switch you can find in the manual pages which enables similar behaviour in the Linux linker. Otherwise, the only trick left is to become familiar with the circular references and "flatten" them out by listing the libraries twice eg c4gl -o sources.4ge sources.o sources1.o library1.a library2.a library1.a library2.a ad nauseum Codd help you if the linker likes to complain about the same function being seen twice in a different library...