INF: GRAPHICS.LIB Cannot Be Used with Tiny Model

ID Number: Q67761

6.00 6.00a 6.00ax 7.00

MS-DOS

Summary:

Programs written in the tiny model cannot use the graphics library

supplied with Microsoft C versions 6.0, 6.0a, 6.0ax, and C/C++ 7.0.

The graphics routines are meant to be model-independent, so they are

labeled as far procedures. The linker does not allow far references in

a tiny model program and does not resolve the references to the

graphics routines.

The sample source code below demonstrates this problem. The program

should be compiled with:

cl /AT foo.c graphics.lib

For more information on building .COM files, query on the following

words in the Microsoft Knowledge Base:

_far and tiny

Sample Code

-----------

#include <graph.h>

void main(void);

void main()

{

_setvideomode(_DEFAULTMODE);

}

Additional reference words: 6.0 6.00 6.0a 6.00a 6.0ax 6.00ax 2.0 2.00

2.01 2.5 2.50 2.51 7.00