Board index » cppbuilder » dos.h library...

dos.h library...


2004-05-05 01:18:55 AM
cppbuilder15
When I compile my application I get unresolved symbols for a lot of functions defined in dos.h. Dos.h exists in the include directory and my function calls match the prototypes. All errors occur at link time. Am I missing a library or do I need to specifically add one to my project?
Thanks,
Hoon
 
 

Re:dos.h library...

Hoon Lee wrote:
Quote
When I compile my application I get unresolved symbols for a lot of functions defined in dos.h. Dos.h exists in the include directory and my function calls match the prototypes. All errors occur at link time. Am I missing a library or do I need to specifically add one to my project?
Which Compiler are you using?
What type of program are you compiling?
(DOS, Win16, Win32, Console, GUI)?
Which symbols are unresolved?
Win32 doesn't support all of the DOS functions.
You need to use the Standard C Library functions or the Windows
version of the functions for obsolete DOS functions.
 

Re:dos.h library...

Thnx for the response. I am using Borland 4.5 and my application is 16-bit dos application. The unresolved symbols I am seeing are: _sound, _nosound, _delay, _spawnlp. The first 3 are prototyped in dos.h and the last in process.h. All standard calls. I can't understand why the compiler would not be able to define them
Bob Gonder < XXXX@XXXXX.COM >wrote:
Quote
Hoon Lee wrote:

>When I compile my application I get unresolved symbols for a lot of functions defined in dos.h. Dos.h exists in the include directory and my function calls match the prototypes. All errors occur at link time. Am I missing a library or do I need to specifically add one to my project?

Which Compiler are you using?

What type of program are you compiling?
(DOS, Win16, Win32, Console, GUI)?

Which symbols are unresolved?

Win32 doesn't support all of the DOS functions.
You need to use the Standard C Library functions or the Windows
version of the functions for obsolete DOS functions.


 

{smallsort}

Re:dos.h library...

I am using the ide and I have defined a project. I have the path to the lib and include directory in my path. I don't understand why the linker would cough on these specific functions (_delay, _nosound, _sound). Other functions from the same header (and I would assume library) are working fine.
Jason
XXXX@XXXXX.COM (Wayne A. King) wrote:
Quote
On 4 May 2004 12:05:27 -0700, "Hoon Lee" < XXXX@XXXXX.COM >wrote:

>I am using Borland 4.5 and my application is 16-bit dos application.

Are you building from the IDE or using the command line tools?
Have you defined a project or are you just building from a single
source module without a project file?

>I can't understand why the compiler would not be able to define them

According to your first message the compiler *does* resolve these
references. It is the linker which rejects them.

--
Wayne A. King
( XXXX@XXXXX.COM , XXXX@XXXXX.COM )
 

Re:dos.h library...

Judging from the symptoms I think it likely that the target platform
is not DOS.
Go to the project window and right click on the EXE name.
Select TargetExpert from the popup window that appears.
In the TargetExpert window look for these things:
- If the target is EasyWin or 16 bit Windows then those functions
are not available.
- If the target is Win32 or Win32s those functions are not available.
. Ed
Quote
Hoon Lee wrote in message
news:40992035$ XXXX@XXXXX.COM ...

I am using the ide and I have defined a project. I have the
path to the lib and include directory in my path. I don't
understand why the linker would cough on these specific
functions (_delay, _nosound, _sound). Other functions from
the same header (and I would assume library) are working fine.
 

Re:dos.h library...

How do I set the project to generate a dos application.
Thanx for all the help...
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote:
Quote
Judging from the symptoms I think it likely that the target platform
is not DOS.

Go to the project window and right click on the EXE name.
Select TargetExpert from the popup window that appears.
In the TargetExpert window look for these things:

- If the target is EasyWin or 16 bit Windows then those functions
are not available.
- If the target is Win32 or Win32s those functions are not available.

. Ed

>Hoon Lee wrote in message
>news:40992035$ XXXX@XXXXX.COM ...
>
>I am using the ide and I have defined a project. I have the
>path to the lib and include directory in my path. I don't
>understand why the linker would cough on these specific
>functions (_delay, _nosound, _sound). Other functions from
>the same header (and I would assume library) are working fine.


 

Re:dos.h library...

In the TargetExpert dialog you set the platform to DOS. If I remember
correctly that selection is found in the lower left of the dialog.
While you in there it would probably also be useful to also set the
memory model to Large.
. Ed
Quote
Hoon wrote in message
news:409923b3$ XXXX@XXXXX.COM ...

How do I set the project to generate a dos application.

Thanx for all the help...

>Go to the project window and right click on the EXE name.
>Select TargetExpert from the popup window that appears.
>In the TargetExpert window look for these things:
>
>- If the target is EasyWin or 16 bit Windows then those
>functions are not available.
>- If the target is Win32 or Win32s those functions are not
>available.
 

Re:dos.h library...

I really appreciate all the help. I am unfamiliar with this environment. I can't select dos from the target model dropdown. I instead installed Turbo C++ 3.0 and will compile the app. from there. Hopefully this will clean up the few remaining errors.
Again, Thanks.
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote:
Quote
In the TargetExpert dialog you set the platform to DOS. If I remember
correctly that selection is found in the lower left of the dialog.

While you in there it would probably also be useful to also set the
memory model to Large.

. Ed

>Hoon wrote in message
>news:409923b3$ XXXX@XXXXX.COM ...
>
>How do I set the project to generate a dos application.
>
>Thanx for all the help...
>
>>Go to the project window and right click on the EXE name.
>>Select TargetExpert from the popup window that appears.
>>In the TargetExpert window look for these things:
>>
>>- If the target is EasyWin or 16 bit Windows then those
>>functions are not available.
>>- If the target is Win32 or Win32s those functions are not
>>available.


 

Re:dos.h library...

If you can't select DOS then you probably are not running Borland C++
(the subject of this newsgroup). All versions of Borland C++ will do
either of DOS or Windows. Turbo C++ comes in Windows and DOS versions
but each version does only that platform. The newsgroup where Turbo
C++ is covered is borland.public.cpp.turbocpp
. Ed
Quote
Hoon wrote in message
news:40994fc5$ XXXX@XXXXX.COM ...

I really appreciate all the help. I am unfamiliar with this
? environment. I can't select dos from the target model
dropdown. I instead installed Turbo C++ 3.0 and will
compile the app. from there. Hopefully this will clean up
the few remaining errors.
 

Re:dos.h library...

I am using old compilers we have laying around the shop. When I am done prototyping we are going to order some new copies. Will Borland C++ 6.0 build 16-bit dos applications.
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote:
Quote
If you can't select DOS then you probably are not running Borland C++
(the subject of this newsgroup). All versions of Borland C++ will do
either of DOS or Windows. Turbo C++ comes in Windows and DOS versions
but each version does only that platform. The newsgroup where Turbo
C++ is covered is borland.public.cpp.turbocpp

. Ed

>Hoon wrote in message
>news:40994fc5$ XXXX@XXXXX.COM ...
>
>I really appreciate all the help. I am unfamiliar with this
>? environment. I can't select dos from the target model
>dropdown. I instead installed Turbo C++ 3.0 and will
>compile the app. from there. Hopefully this will clean up
>the few remaining errors.


 

Re:dos.h library...

There is no Borland C++ 6.0. The last version of Borland C++ was 5.02
and it was released in 1997.
There is a C++ Builder 6. It is the latest and current version. It
only creates 32 bit Windows programs (which is to be expected since
DOS has been obsolete and out of production for something like 8
years). You can tell which newsgroups are for C++ Builder by the word
'cppbuilder' in their name.
The compilers which can create DOS programs are:
Any version of Borland C++
Any version of Turbo C++ for DOS
Any version of Turbo C
. Ed
Quote
Hoon wrote in message
news: XXXX@XXXXX.COM ...

I am using old compilers we have laying around the
shop. When I am done prototyping we are going to
order some new copies. Will Borland C++ 6.0 build
16-bit dos applications.