Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!microsoft!dans From: dans@microsoft.UUCP (Dan SPALDING) Newsgroups: comp.os.os2.programmer Subject: Re: Can OS/2 executables be built under DOS? Message-ID: <58778@microsoft.UUCP> Date: 5 Nov 90 04:25:18 GMT References: <1990Nov2.152618.3790@craycos.com> Reply-To: dans@microsoft.UUCP (Dan SPALDING) Organization: Microsoft Corp., Redmond WA Lines: 22 In article <1990Nov2.152618.3790@craycos.com> jrbd@craycos.com (James Davies) writes: >Is it possible to compile and link an OS/2 executable under DOS 3.3? >I have Microsoft C V5.1. The distribution includes OS/2 libraries, >and implies that the same linker is used for both systems. I thought >that I would be able to just link with the OS/2 libs and startup code, >then do a BIND on the result to produce a .EXE file that would work >both on DOS and OS/2, but it doesn't seem to be working out that way. >(The manuals haven't been real helpful - the OS/2 stuff was apparently >added as an afterthought.) > >Am I trying something impossible here? Thanks in advance for any advice... What you need to do is compile the modules with the /Lp switch and link with the os/2 libs (?libc?p.lib) To produce a bound executable that runs on both os/2 and dos, you need to produce an os/2 executable first. the binder (bind.exe) then can be used to produce the bound executable. Hope this helps. I know that the info is in the c5.1 ref man somewhere, probably not easy to find, (*sigh*) but should be in the new section that explains some of the new features of the c runtime for os/2.