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

Compiling in Borland C++ 5.02 in DOS with Make File

296 views
Skip to first unread message

Wilson Figueroa

unread,
Dec 19, 1999, 3:00:00 AM12/19/99
to
Hi Again,

I booted into dos and wanted to compile a program (sqrtmain.c and
longmath.c which relys on some c:\bc5\lib libraries).

When I type make sqrtmain.mak, I receive the following messages:

32loader error: 'C:\BC5\BIN\MAKE.EXE'
Invalid import references:
- module 'KERNEL32.dll' entrypoint 'GetCPInfo'
- module 'KERNEL32.dll' entrypoint 'CreateFileW'
- module 'KERNEL32.dll' entrypoint 'GetDateFormatA'
- module 'KERNEL32.dll' entrypoint 'GetFileAttributesW'
- module 'KERNEL32.dll' entrypoint 'GetShortPathNameA'
- module 'KERNEL32.dll' entrypoint 'GetStringTypeW'
- module 'KERNEL32.dll' entrypoint 'GetVersionExA'
Do you want to attempt running this program (Y/N)?
(Load error 84)
32stub error: The program can not be loaded

The make file is as follows:

# make file for Newton's square root (full version)
# Borland C v. 4.0
#
# to use your files you need only put your
# path to your Borland libraries in the LIBPATH below

FILE1=sqrtmain
FILE2=longmath
LIBPATH=c:\bc5\lib

# Meaning of compiler switches:
# -c compile only
# -K characters default to unsigned
# -M have the linker generate a map file
# -Od disable all optimizations
# -v source debugging on
# -ms small memory model or
# -ml large memory model
# -y line numbers on
# -D #define for MAX_SIZE
#
.c.obj:
bcc -c -K -M -Od -v -ml -y -DMAX_SIZE=50 $<

$(FILE1).exe: $(FILE1).obj $(FILE2).obj
# tlink /v /s $(LIBPATH)\c0s $* $(FILE2), $*, ,
$(LIBPATH)\emu.lib+$(LIBPATH)\maths.lib+$(LIBPATH)\cs.lib
tlink /v /s $(LIBPATH)\c0l $* $(FILE2), $*, ,
$(LIBPATH)\emu.lib+$(LIBPATH)\mathl.lib+$(LIBPATH)\cl.lib

$(FILE1).obj: $(FILE1).c $(FILE2).h

$(FILE2).obj: $(FILE2).c $(FILE2).h

Can anyone here help? Note, I am just learning "C" and purchased a
compiler that seems to be able to solve "C" and "C++" programs.

Thank you.

Wilson
fl...@safebunch.com
http://safebunch.com

Only T

unread,
Dec 20, 1999, 3:00:00 AM12/20/99
to
Wilson Figueroa wrote:
>
> Hi Again,
>
> I booted into dos and wanted to compile a program (sqrtmain.c and
> longmath.c which relys on some c:\bc5\lib libraries).
Why do you expect your 32-bit windows compiler to work in 16-bit dos?

Wilson Figueroa

unread,
Dec 20, 1999, 3:00:00 AM12/20/99
to Only T

I thought (but I could be wrong), that going into a DOS prompt meant 16
bit.

Perhaps this is an error on my part (I will look into it).

Thanks for the heads up, an poor oversight on my part.

By the way, can library files between compilers?

For example, can I compile w\this program using Visual C++ or gcc as the
compiler?

Thanks for any inputs.

Wilson

Dave Cullen

unread,
Dec 21, 1999, 3:00:00 AM12/21/99
to

Wilson Figueroa wrote:
>
> Only T wrote:
> >
> > Wilson Figueroa wrote:
> > >
> > > Hi Again,
> > >
> > > I booted into dos and wanted to compile a program (sqrtmain.c and
> > > longmath.c which relys on some c:\bc5\lib libraries).
> > Why do you expect your 32-bit windows compiler to work in 16-bit dos?
>
> I thought (but I could be wrong), that going into a DOS prompt meant 16
> bit.

Don't know about Borland 5.0 (this is a Microsoft VC++ group). But
Visual C's "DOS" window is actually a 32 bit Windows application, not 16
bit, even though it looks identical to a DOS screen. Perhaps Borland's
is the same.



> By the way, can library files between compilers?
>
> For example, can I compile w\this program using Visual C++ or gcc as the
> compiler?

C++ source code can usually be converted, depending on the platform
specific stuff it contained. DOS is no longer supported by Visual C++,
so forget interrupts and the like.

drc

--
Dave Cullen

Real Address: dcullen at prox dot com

Governor Bush

unread,
Dec 21, 1999, 3:00:00 AM12/21/99
to
Dave Cullen wrote:
>
> Wilson Figueroa wrote:
> >
> > Only T wrote:
> > >
> > > Wilson Figueroa wrote:
> > > >
> > > > Hi Again,
> > > >
> > > > I booted into dos and wanted to compile a program (sqrtmain.c and
> > > > longmath.c which relys on some c:\bc5\lib libraries).
> > > Why do you expect your 32-bit windows compiler to work in 16-bit dos?
> >
> > I thought (but I could be wrong), that going into a DOS prompt meant 16
> > bit.
"booted into dos" and "going into a dos prompt" are two different
things. Booting into dos gives you dos, going to a console windows gets
your a console app environment, not dos, not 16-bit. The 32-bit borland
(and MS) compiler should work in a console window. If that is what
Wilson did, then the error comes from somewhere else.

> Don't know about Borland 5.0 (this is a Microsoft VC++ group). But
> Visual C's "DOS" window is actually a 32 bit Windows application, not 16
> bit, even though it looks identical to a DOS screen. Perhaps Borland's
> is the same.

Both are 32-bit programs that won't work in dos. NT console is not dos
though.

0 new messages