home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!darwin.sura.net!wupost!usc!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
- From: dic5340@hertz.njit.edu (David Charlap)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: Using MS-C (MSDOS) library for OS/2 ... possible?
- Message-ID: <1992Jul29.160423.15953@njitgw.njit.edu>
- Date: 29 Jul 92 16:04:23 GMT
- References: <1992Jul28.135030.3386@monu6.cc.monash.edu.au>
- Sender: news@njit.edu
- Organization: New Jersey Institute of Technology, Newark, N.J.
- Lines: 66
- Nntp-Posting-Host: hertz.njit.edu
-
- In article <1992Jul28.135030.3386@monu6.cc.monash.edu.au> sci240s@monu6.cc.monash.edu.au (Mr W.J. Ho) writes:
- >
- >Can I use Microsoft C (Version 6.00a) to write OS/2 programs (I understand
- >they will be 16-bit only) using the libraries (eg, neural nets library that
- >uses specialize co-processor board)?
-
- Yes. I do this quite a bit. Go to your C 6.00 install disk and
- re-install it, telling it to build the OS/2 libraries. Also have it
- include the OS/2 compiler. Afterwards, apply the 6.0a patch (if you
- have a separate set of patch disks for the "a" revision).
-
- You may want to delete the DOS isntalltion first, although this isn't
- necessary.
-
- The OS/2 executables will be placed in a .../BINP directory
- The DOS executables will be placed in a .../BINR directory
- The bound (both OS/2 and DOS) executables will be placed in a .../BINB directory
-
- All libraries will be placed in one place: .../LIB
- Real-mode (DOS) libraries will have names of the form ?LIBC?R.LIB
- Protected mode (OS/2) libraries will have names of the form ?LIBC?P.LIB
- One of the library sets (Real or protected) may be renamed without the
- P/R suffix. This will be your default library for the linker.
-
- After installing, place the .../BINP and .../BINB directories on your
- OS/2 PATH (in config.sys). Place the .../BINR and .../BINB
- directories on your DOS PATH (in autoexec.bat)
-
- The other variables (like LIB, INCLUDE, HELPFILES, etc) should be set
- in both config.sys and in autoexec.bat, since they are common to OS/2
- and DOS.
-
- Once this is done, you simply give the "CL" command to compile. Your
- default executable type will be either DOS or OS/2 depending on what
- kind of session you run it from. To force the other type (required if
- you need libraries with the P/R suffix), you use the parameters "/Lp"
- or "/Lr". This way, you can compile DOS code from the OS/2 compiler
- and vice-versa.
-
- Use the LINK.EXE that came with OS/2 2.0. It's of a slightly higher
- version than the Microsoft LINK.EXE. I renames the Microsoft LINK.EXE
- to MSLINK.EXE, to allow me to use either one.
-
- The NMAKE utility that comes with Microsoft C 6.0 is compatible
- (mostly) with the Unix make utility, and is useful for compiling GNU
- makefiles.
-
- The Microsoft compiler comes with all the headers and libraries you
- need to produce OS/2 1.2 code. OS/2 2.0 comes with rc for compiling
- resources in, and it also includes the icon editor. You do not have a
- font editor or a dialog box editor. The IBM OS/2 2.0 toolkit has
- these and lots of other stuff.
-
- The Microsoft on-line help (QuickHelp) does not include the OS/2 API
- reference. You must get the Microsoft OS/2 1.2 toolkit for this.
- It's been discontinued, but you may be able to find a copy at some
- stores or computer flea markets.
-
- If you can find the IBM OS/2 1.3 toolkit, I believe it'll have the
- headers and libraries to produce OS/2 1.3 code. But there aren't too
- many new API's in it, so it may not be necessary.
- --
- |) David Charlap "I don't even represent myself
- /|_ dic5340@hertz.njit.edu sometimes so NJIT is right out!.
- ((|,)
- ~|~ Hi! I am a .signature virus, copy me into your .signature file.
-