Board index » delphi » problems using dos.h functions

problems using dos.h functions

Hi to all.
I'm trying to control hardware ports with BC++ 5.01, but when I call any
function included in dos.h I get an undeclared function call error by the
compiler.
Any ideas?

Thanks!

Sebastian

 

Re:problems using dos.h functions


Quote
> I'm trying to control hardware ports with BC++ 5.01, but
> when I call any function included in dos.h I get an
> undeclared function call error by the compiler.

DOS, 16 bit Win3.1x or Win32 progrram?

What function?  What does the Portability link on the help screen for the
function say?

.  Ed

Re:problems using dos.h functions


Quote
> DOS, 16 bit Win3.1x or Win32 progrram?

> What function?  What does the Portability link on the help screen for the
> function say?

> .  Ed

It's just a DOS program... the most simple you could imagine :P

The messages are:
Error:  noname00.cpp(7,9):Call to undefined function 'intp'
Error:  noname00.cpp(8,29):Call to undefined function 'outp'

But I get that error with any function in dos.h. Of course the library is
included in the code.
It doesn't work even copy-pasting examples from the User's Guide.
I'm not very experticed in C++ and can't figure out what's happening...

Thank's for you help.

Sebastian

Re:problems using dos.h functions


No, you are not compiling a DOS program.  DOS programs with dos.h included
have inportb and outportb and the intp and outp named equivalents provided
for migrants from MS compilers who feel they must use the names MS used.

It is only in a Win32 program that they are not available.  Go into
TargetExpert and change the target type to a DOS program.

.  Ed

Other Threads