Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calls to dos.h functions...

Status
Not open for further replies.

Ramone

Programmer
Feb 3, 2003
7
0
0
CA
When I put dos functions in my programs like "outportb()" ,"intx86()" or inportb(), my compiler gives the "call to undefined function" error even if I include dos.h... I tried with other compilers, with the same result... Only Turbo C++ 2.01 compiles correctly. Any ideas?
 
What OS?
James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
My OS is Windows 2000 Pro and my compiler Borland C++ 5.0 But the weird thing is that I tried to install it on a Win98 pc and it does the same thing. I also tried other recent compilers and it does the same too. At the university, we have Win NT4 pc s with Borland C++ 4.5 and my program compiles perfectly... Also, I don't receive any error message from the compiler about the dos.h library, and the library itself seems okay, and the function declarations are here...
 
The more recent compilers not longer allow the use of those functions since they aren't allowed in the newer Windows OS. See and
for more info. The older compilers still include those functions but they may not work properly in the newer Windows versions. James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Thanks a lot for the infos and the links! I knew that Borland might have removed some old functions in their new compiler... But since my program has to work under DOS, do you think that I can replace the dos.h file of C++ 5.0 by an older one from C++ 4.0? I know I could use an older compiler like Turbo C++, but personally I think that Borland C++ is a little more user friendly ;) I think I will try this :)
 
If you are compiling to a Win32 App. (I think the latest compiler can only do this). You will not be able to access old DOS function calls. They are not available to ANY Win32 app.
-Chris (Consultant / Software Engineer)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top