c4gl - COMPILATION
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
T.Jalaludeen wrote:
> I am developing application using Informix-4GL V6.05.UD2
Time to upgrade.
> We have library files (whose function can be shared by other
> programs) in /lib directory, and individual programs in /xxx
> directory (which contains MAIN program)
> I would like to use the library file in library directory. Which
> means I would like to compile my MAIN program in xxx directory,
> and also link the files in /lib directory. How do I do this using
> c4gl?
How would you do it with a C compiler? Answer: -L/lib -lname on
the command line, assuming your library is libname.a or libname.so.
> The main purpose is when I do some changes in /lib directory,
> and compile it after the changes. I should not compile the MAIN
> program but the changes should be reflected when in run the MAIN
> program.
That sounds like a rquest for shared libraries. More complex. But
doable, provided you know how to create shared libraries on your
machine anyway. Basically, you ensure that you use the same options
to compile your I4GL code as you would to compile C code into a
shared library. On SVR4-derived machines, that means using -KPIC
or -Kpic (or -fPIC or -fpic with GCC) to compile the objects, and
use -G to build the shared object. You might have some problems
getting the -G option seen by the C compiler; if all else fails, set
INFORMIXC="cc -G". Assuming you're usihng SVR4. HP-US is different.AIX is probably different. SCO is probably different. Etc. You
have to know how to do it, which means compiler and/or linker/loader
manual bashing.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
Name : T.Jalal E-mail : jala@hpsgm99.sgp.hp.com Hai, I am developing application using Informix-4GL V6.05.UD2 We have library files (whose function can be shared by other programs) in /lib directory, and individual programs in /xxx directory (which contains MAIN program) I would like to use the library file in library directory. Which means I would like to compile my MAIN program in xxx directory , and also link the files in /lib directory. How do I do this using c4gl? The main purpose is when I do some changes in /lib directory , and compile it after the changes. I should not compile the MAIN program but the changes should be reflected when in run the MAIN program. Thanks T.Jalal