www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - CAN NOT with intdos().

reply Altaf <aladhani yahoo.com> writes:
Hi Folks,

I have been trying to recompile/porting old 16bit code with sc.exe. A
function call intdos() is comming as undefined. I see the function in
dos.h BUT it is nested with
#ifndef __NT__
...
..
#endif

I am not defining __NT__ anywhere in my compile line.

here is a small example.

http://www.digitalmars.com/chmod.c

uses the same intdos()
and it is not compiling as well.

I tried

sc -mti chmod.c

Can anyone please resolve the mistery for me??

Altaf
Feb 17 2002
next sibling parent Jan Knepper <jan smartsoft.cc> writes:
Where is it comming 'undefined'?
During compile? You might want to include 'dos.h'
During link? You might be missing the library that contains the
implementation. try -ml instead of -mti

Jan



Altaf wrote:

 Hi Folks,

 I have been trying to recompile/porting old 16bit code with sc.exe. A
 function call intdos() is comming as undefined. I see the function in
 dos.h BUT it is nested with
 #ifndef __NT__
 ...
 ..
 #endif

 I am not defining __NT__ anywhere in my compile line.

 here is a small example.

 http://www.digitalmars.com/chmod.c

 uses the same intdos()
 and it is not compiling as well.

 I tried

 sc -mti chmod.c

 Can anyone please resolve the mistery for me??

 Altaf

Feb 17 2002
prev sibling parent "Kenneth Roger" <kennethroger prodigy.net> writes:
 sc -mti chmod.c

Try sc -mtdw chmod.c
 I am not defining __NT__ anywhere in my compile line.

It gets defined automatically if the compilation has defaulted to Windows. Your -mti switch might not be recognized.
Feb 17 2002