🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
3 messages
3 total messages Started by James Davies Fri, 02 Nov 1990 15:26
Can OS/2 executables be built under DOS?
#1610
Author: James Davies
Date: Fri, 02 Nov 1990 15:26
13 lines
1006 bytes
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...

						Jim Davies
						jrbd@craycos.com
Re: Can OS/2 executables be built under DOS?
#1615
Author: Dan SPALDING
Date: Mon, 05 Nov 1990 04:25
22 lines
1654 bytes
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.
Re: Can OS/2 executables be built under DOS?
#1619
Author: Peter Knight
Date: Mon, 05 Nov 1990 09:25
32 lines
1724 bytes
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...

>						Jim Davies
>						jrbd@craycos.com

Yes, it is.  All you have to do is to include the right run-time library.

Eg SLIBCEP instead of SLIBCER.  To do this, you need to have built the 
library from the distribution disks, and to set the linker flags to get 
the 'right' library. I cannot tell you how to do this, as which library
is the default (SLIBCE) is set when you built the libraries.

Yes, I agree the OS/2 stuff is an after-thought/kludge/panic-measure/
typical-MS-c*ck-up.

Peter Knight
BT Reasearch

#include <std.disclaimer>

Views expressed here are my own, and are not endorsed by my employer.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads