Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Porting C++ code from Unix to AS/400

170 views
Skip to first unread message

Daniel....@saf-ag.com

unread,
Mar 22, 2000, 3:00:00 AM3/22/00
to
Hello AS/400 experts out there!
For a few weeks now, I'm still looking for a good way for porting our
C++ projects to the AS/400.
The projects consist of a whole set of directories together with the
appropriate makefiles. Everything is ANSI compliant and based on
console output.
I've got some experience with porting previous versions of
my company's products, which were still written in C.
The porting process used the following techniques:
1. an FTP script was used to map the directory structure
to proper file members and libraries on the AS/400
2. the old TMKMAKE tool was used to define the
dependencies and compiler options
3. the ILE C compiler was called to compile and link
everything
Knowing that OS/400 now supports a hierarchical file system
(aka IFS) and that some Unix tools like "make" were ported
to the AS/400, I was hoping to streamline the process by
eliminating several disadvantages like:
- restrictions of the library/file/member concept
- limitation of the filename length
- maintenance of mapping-info in the FTP-script
- maintenance of special makefiles with unconventional
compiler syntax
- etc...
I did a try with Qshell (command QSH), the Qshell utilities
(PRPQ 5799-XEH) and the ILE/C++ compiler but I don't really
see how to use them together to reach the goals I've set to
myself.
Does anyone of you AS/400 experts have some experience with this
and could give me some advice, please?
I would be very happy for any useful hint, Thank you in advance!
Daniel Weidner
Software Development
SAF Simulation, Analysis and Forecasting Gmbh Germany
email: mailto:daniel....@saf-ag.com
More infos ? Visit our website: http://www.saf-ag.com
Forecasting is our success


Sent via Deja.com http://www.deja.com/
Before you buy.

Joel Eikenhorst

unread,
Mar 22, 2000, 3:00:00 AM3/22/00
to
All your problems are solved with a set of freeware utilities that you
can request at:
http://www.as400.ibm.com/developer/porting/faq10.html

Included are gnu-make,bison,flex,gnu-awk,gzip,glib, and some other
utilities. Plus there is a compiler/binder front end that works like cc
supporting long filenames to shield you from the library/file.member
syntax.

Chris Smeets

unread,
Apr 2, 2000, 4:00:00 AM4/2/00
to
We purchased ILE/C with our model 170 about a year and a half
ago and just recently purchased Visual Age C++ for AS/400.
I assume that ILE/C++ is similar to ILE/C except that it is C++
rather than C but I havn't worked with it.

Since I am a PC programmer for the most part, I am much more
at home working with the Visual Age product and find it to be a big
improvement over ILE/C. It is a PC program, so all source files
reside on the PC. You are free to use subdirectories,
long file names and don't need to deal with source physical files
at all. I am using the same tools to maintain my PC source and my
AS/400 source (Visual Slick Edit, Borland Make etc). In fact much
of the source is common to both AS/400 and PC projects.

Visual Age C++ v3.5 for Windows also ships with the compiler
but it isn't needed. You do need client access however since it
is used to communicate with the compiler back end on the AS/400.

The first phase of the compiler works very much like a PC compiler
so the editor is able to jump to compiler errors and so on. It generates
an intermediate object which is uploaded to the AS/400 and converted
to a *MODULE by the compiler back end. Its faster than uploading the
source to the AS/400 and compiling it there as I was doing with ILE/C.

A programming guide and user's guide ship with the compiler
and can be viewed on line at
http://publib.boulder.ibm.com/pubs/html/as400/online/7eng44.htm
You should be able to get an idea of what the product is like by
browsing the user's guide. Also, I recall that our IBM rep mentioned
that a demo CD was available so you might be able to get an evaluation
version from IBM.

A few messages back someone mentioned that the Visual Age compiler
was being discontinued. I find that hard to believe since much of
OS/400 is written in it. My guess is that they were refering to
the V3R7 release. The version we bought was V4 and can only target
V3R2 or V4R2 or higher.

<Daniel....@saf-ag.com> wrote in message
news:8ba7a2$eea$1...@nnrp1.deja.com...

0 new messages