고수님들...
안녕하십니까...
아래 소스코드를 컴파일하면 아래와 같은 에러가 발생합니다.
도스창에서 터보씨 IDE를 띄어놓고 하면 에러가 발생하지 않습니다.
물론 터보씨 IDE 메뉴의 Option->Linker->Graphics Library를 On상태로 만들었구요.
에디트 플러스에서 컴파일시 에러가 나지 않게 하는 컴파일 옵션은 없습니까?
휴우... 고수님들의 조언을 바랍니다.
/*
소스코드
*/
#include <math.h>
#include <conio.h>
void main(){
int gd = 0;
int gm;
double i;
initgraph(&gd, &gm, "");
setcolor(1);
line(0, 200, 639, 200);
for (i=0;i<639;i+=0.1){
putpixel(i, sin(i*M_PI/180*5)*100+200, 15);
}
getch();
closegraph();
}
/*
에러 메시지
---------- Compile ----------
Turbo C Version 2.0 Copyright (c) 1987, 1988 Borland International
c:\codeexam\pcgame\chap02\1\exam1.c:
Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland International
Undefined symbol '_closegraph' in module exam1.c
Undefined symbol '_putpixel' in module exam1.c
Undefined symbol '_line' in module exam1.c
Undefined symbol '_setcolor' in module exam1.c
Undefined symbol '_initgraph' in module exam1.c
Available memory 349932
출력 완료 (1초 경과) - 정상 종료#include <graphics.h>
*/
|