TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Grant Popoff
from: Rob Landley
date: 1995-10-29 22:18:00
subject: IBM`s C-Set++ 2.1 starter kit

> I would like some comment on this package, is it a worth while program for
> someone starting into OS/2 development.  

There is a free 32 bit OS/2 C++ compiler out there called "EMX",
which you can FTP from ftp.cdrom.com/pub/os2/unix/emx09a.  You need the
following four files for the basic compiler: emxrt.zip, emxdev.zip,
gnudev.zip, gppdev.zip.

Once you've unzipped them all into the root directory (they'll create their
own subdirectories), you need to make some config.sys changes (basically
add it to your .exe and .dll paths, and set a couple of environment
variable.)  Here, lemme block copy it for you...

add C:\EMX\DLL to your "LIBPATH=" line
add C:\EMX\BIN to your "SET PATH=" line

SET INCLUDE=D:\EMX\INCLUDE
SET C_INCLUDE_PATH=D:\EMX\INCLUDE
SET LIBRARY_PATH=D:\EMX\LIB
SET CPLUS_INCLUDE_PATH=D:\EMX\INCLUDE.CPP;D:\EMX\INCLUDE
SET GCCOPT=-pipe

That'll get you set up.  Now for a bit of explanation:

EMX is a unix emulator package.  It compiles unix source code to run under
OS/2, and uses a dll (emx.dll) to emulate unix system calls.  The compiler
that comes with it is called GCC, and if you type

gcc filename.c

it will compile filename.exe and emulate unix for it.  To tell it to
compile OS/2 native source code for OS/2 (which doesn't need emx.dll), you
need two command line switches:

gcc -Zomf -Zsys filename.c

Two other switches you'll want are -o (next thing is the output filename,
otherwise it'll use the first source code filename as the name of the
.exe), and -O2 (optimize, second level.  Takes longer, produces better
output.  There is a third level (-O3), but all that adds is automatic
inlining of small functions.)

Oh, and -s will strip the symbol table (debugging info.  Makes the output smaller.)

so you go

gcc -Zomf -Zsys -O2 -s -o output.exe file1.cc file2.cc file3.cc file4.obj
file6.def file7.res

And it'll make a program for you.

There's a project manager called "bake"
(ftp.cdrom.com/pub/os2/dev32/bakev100. zip) which will simplify things a
LOT.  You won't need to know any command lines or anything, it's much
easier to use.

Rob
 
--- Xblat
* Origin: The conversation pit, OS/2 in Boca Raton, FL (1:3638/42)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 517 628 704 713/888 800/1 7877/2809
@PATH: 3638/42 14 3615/50 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.