× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi.


I'm completely new to AS/400 (OS400) so please don't be too cryptic when
replaying ;)

Iâ??m involved into porting an application to OS400 platform. My
application is using APR portability library which is part of OS400 Apache
HTTPd server.

Now Iâ??m trying to link together my compiled object files into a test
program. Iâ??m using â??iccâ?? script for compiling and linking. However I
encountered problems â?? I donâ??t know how to specify / link APR with my
object files.

Can someone explain me some basic concepts about OS400 please. Let say
that I have three files:
-       mod1.c
-       mod2.c
-       prog.c

The â??prog.câ?? contains the â??main()â?? function. I created those
objects by doing:
----
export â??s OUTPUTDIR=mymodule
system â??CRTLIB LIB(MYMODULE)
icc â??c mod1.c â??o mod1.o
icc â??c mod2.c â??o mod2.o
icc â??c prog.c â??o prog.o
----

My sources are dependant of apr_pool, apr_strings, apr_poll, apr_file,
apr_utils_queue. I guess that mostly of those objects are collected in
following BIDDIRs:
----
/QSYS.LIB/QHTTPSVR.LIB/QZSRAPR.BNDDIR
/QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.BNDDIR
/QSYS.LIB/QHTTPSVR.LIB/QZSRSDBM.BNDDIR
/QSYS.LIB/QHTTPSVR.LIB/QZSRXMLP.BNDDIR
----

How can I check what is included in e.g. QZSRAPR.BNDDIR â?? I tried to use
â??DSPBNDDIR BNDDIR(QHTTPSVR/QZSRSDBM)â?? from the MAIN MENU, however
nothing was displayed.

I tried to link the above code with:
----
icc -v -qBNDSRVPGM="QHTTPSVR/QZSRXMLP QHTTPSVR/QZSRSDBM QHTTPSVR/QZSRCORE
QHTTPSVR/QZSRAPR" mod1.o mod2.o prog.o â??o prog
----

Unfortunately not all objects are resolved (e.g. the â??apr_queue_termâ??
canâ??t be found). Does anyone have a clue what to do? :)


Additionally can someone please provide an example how to create a BNDDIR
from mod1.o and mod2.o? I guess that in such a case the linking cmd line
would look like:
----
icc -v -qBNDSRVPGM="QHTTPSVR/QZSRXMLP QHTTPSVR/QZSRSDBM QHTTPSVR/QZSRCORE
QHTTPSVR/QZSRAPR MYMODULE/BND_NAME" prog.o â??o prog
----

Will mod*.o objects be linked â??dynamicalyâ?? in such a case (bind at
runtime)?


Any hint / link / example, â?Ś - anything) would be really helpful for me.


Thanks and best regards,
Dezo



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.