Someone please help, we are trying to port all of our Informix
4gl code from Sun0S 4.1.3 to Solaris 2.5. Our esql/c programs
have showed no problems on the porting, but our 4gl programs
have..
Take this case using static libraries, on 4.1.3, it works, but
here's what happens with Solaris 2.5:
theron->./c4gl test.4gl -static -o ./test
cc -I/usr1/informix/incl/tools -I/usr1/informix/incl/esql test.c -o
./test -L/usr1/informix/lib/tools -l4gl -lnforms -lfesql -los -lasf
/usr1/informix/lib/tools/netlib.a -los -lasf -lgen -lnsl -lsocket -lm
-ltermlib
theron->./test
This is a test
ARG= -1
NO arg
Segmentation Fault (core dumped)
And here's the code:
MAIN
DEFINE tsr_id CHAR(6),
arg_no INTEGER
DISPLAY "This is a test"
LET arg_no = 0
LET arg_no = num_args()
DISPLAY "ARG= ", arg_no
IF arg_no > 0
THEN
DISPLAY "arg in"
LET tsr_id = arg_val(1)
DISPLAY "tsr_id = ", tsr_id
ELSE
DISPLAY "NO arg "
END IF
END MAIN
1. Why would it core dump at 'END MAIN'?
2. Why would 'num_args()' return -1 even though we passed
arguments??
---------------
c4gl, just to compile this program, takes over 90 seconds before
it finishes the compile... On the SunOS 4.1.3 platform, it will take
about 2-3 seconds...
---------------
Problem 3: (THE BIGGIE)
When we try and run our commercial application (Compiled with a
'static' library), we get the following:
theron->./protel.4ge
Program stopped at "SLIB/main.4gl", line number 16.
4GL run-time error number -25588.
The appl process cannot connect to OnLine server online_dev.
theron->
The line that it happens on in the .4gl is immediately following
'MAIN'... There are NO statements, so it's trying to execute some
informix start-up routine and we are getting the message there...
The other day, I tried to use 'c4gl -shared' to use a shared library
instead and low and behold, we did NOT get the above error message.
So it only happens with 'static' libraries... Something is definitely
very wrong.
When we use shared libraries, we STILL get 'Problem #1'...
------------------
Informix Technical Support has not given us the proper help needed in
solving these 3 problems, so we are left 'guessing' and grabbing
at straws!!
Anyone else have any ideas...
thanks again,
MIS, Promark One