Why at compile time always said my graphics library does not define a function

Category: C/C++ -> C Author: WUdan519 Date: 2007-03-29 10:36:33
 
WUdan519
2007-03-29 10:36:33
# Include "graphics.h"
# include "stdlib.h"
# include "stdio.h"
# include "conio.h"

main () {
int gd = DETECT, gm;
initgraph (& gd, & gm, ; "");
setcolor (255);
line (0,240,640,240);
line (320,0,320,480);
}
zhuangjzg
2007-03-29 10:56:28
another of your program the following error may occur:
This is my back posted:
Turbo C for use initgraph () function directly graphics initialization routine, the compiler and when the link is not
the appropriate drivers (*. BGI) is loaded into the program, when the program proceeds to intitgraph ()
statement, from the The third form of the function argument char * path specified in the path to find the appropriate
driver. If no driver is in C: \ TC in to look for, such as C: \ TC or TC still does not exist without,
error will occur:
; BGI Error: Graphics not initialized (use 'initgraph')
Therefore, for ease of use, No driver should be able to establish an independent running executable
graphics program, Turbo C as specified by the following steps (here EGA, VGA display, for example):
1 in the C: \ TC subdirectory, enter the command: BGIOBJ EGAVGA
This command converts the driver EGAVGA.BGI EGAVGA.OBJ target file.
2. in C: \ TC subdirectory, enter the command: TLIB LIB \ GRAPHICS.LIB + EGAVGA
; this command is meant to EGAVGA.OBJ object modules loaded into GRAPHICS.LIB library file.
3. in the program initgraph () function call preceded by a:
; registerbgidriver (EGAVGA_driver):
This function tells the linker when connecting to EGAVGA driver loaded into the user's execution process
kexin06
2007-03-29 11:13:01
environment TC3.0, just Forgot
zengyutao
2007-03-29 11:23:17
put quotation marks into <and> give it a try, and then see if there is any macro is not defined
yaoziqiangjkl
2007-03-29 11:41:44
changed nor should be no undefined , graphic header file defines

LINE and compile this program always work after LINK LINE I said no definition
yangkunaini1314
2007-03-29 11:46:18
select option \ linker \ libraries \ graphics library
yxy_thu
2007-03-29 11:58:41
ask how selected option \ linker \ libraries \ graphics library
is written inside a statement in C do

C language I've never done graphic design This is the first contact
chenghaojian
2007-03-29 12:13:16
Of course not, press F10, you will see a menu bar becomes a different color (usually black), then move to the option selected, press the back car, and then press the keyboard arrow keys to move to the linker, press Enter. A pop-up menu, and then ........................
liuzunshi
2007-03-29 12:15:45
1. In C: \ TC subdirectory, enter the command: BGIOBJ EGAVGA
; This command converts the driver EGAVGA.BGI EGAVGA.OBJ target file.
2. in C: \ TC subdirectory, enter the command: TLIB LIB \ GRAPHICS.LIB + EGAVGA
; this command is meant to EGAVGA.OBJ object modules loaded into GRAPHICS.LIB library file.
3. in the program initgraph () function call preceded by a:
; registerbgidriver (EGAVGA_driver):

these commands can not be executed under the TC me, I use the 2000
relationship you have this and the system
thesedays
2007-03-29 12:27:38
This "option \ linker \ libraries \ graphics library" is not a statement that the tc
option is an option on the menu, this option is also behind a sub-menu under the option, the last one
is where you find the library file
hedy2009c
2007-03-29 12:41:28
in what way those few commands, you boss help me
but to my homework, I'm almost worried to death
plyx0551
2007-03-29 12:54:30
BGIOBJ
TLIB
in tc directory, I was in the bin subdirectory;
registerbgidriver (EGAVGA_driver);
in tc using
gauz
2007-03-29 13:09:21
you select select option \ linker \ libraries \ graphics library
yet?
environment in tc Select
maxmar
2007-03-29 13:23:47
Thank you, thank you, to solve the