Operating System - HP-UX
1855738 Members
7156 Online
104103 Solutions
New Discussion

COBOL and aCC on HP-UX 10.20

 
Jason Steiner
New Member

COBOL and aCC on HP-UX 10.20

I am trying to link together three pieces of COBOL
code with a large C++ application (don't ask). I
am able to create a shared library that holds all
of the COBOL modules and an executable that runs
and calls the COBOL in the shared library.

If I move any one of the COBOL modules from the
shared library to the C++ executable link, I do
not receive any link errors. However, I get an executable that "runs-away" when
the COBOL is referenced (meaning the executable starts chewing up
a lot of CPU time without any logging coming out of
the COBOL that is being referenced).

I think I have all of the name mangling taken care
of using the "extern "C"" linkage. What else could this be? Any ideas would
help!


Jason
1 REPLY 1
Komal Sundaram_1
New Member

Re: COBOL and aCC on HP-UX 10.20

If I am not mistaken, code that goes into a shared library should be PIC
(position indepenent code). If you have to link an object module directly with
an executable, try recompiling it so that it is not PIC.

With a C compiler on HP you use the +z or +Z option.

Hope this helps