hi, unsure if this is the right part to post this sorry if it is.
i was wondering if anyone could figure out what the error means when i try to run it, when i compile it says there is no errors but then when i try to run the program it comes up with serveral errors.
Here is the code
the errors is get are.Code:#include<stdio.h> #include<conio.h> #ifndef Q4_CPP #define Q4_CPP // Function defs #define DOS_INT int 21h #define VIDEO_INT int 10h #define KEYBOARD_INT int 16h // Sub function defs #define GET_DATE 2Ah #define GET_VID_STATE 0Fh #define SCROLL_UP 06h #define GET_TIME 2Ch #define CURSOR_TO 02h #define GET_CURSOR 03h #define SET_CURSOR_SHAPE 01h #define CHECK_KEYBOARD 11h #define SCREEN_HEIGHT 25 #define SCREEN_WIDTH 80 #define BLUE 1 #define BLACK 0 #define GREEN 4 #define MSG_ROWS 4 #define MSG_WIDTH 24 #define WIN_TOP (SCREEN_HEIGHT-MSG_ROWS) / 2 #define WIN_LEFT (SCREEN_WIDTH-MSG_WIDTH) /2 #define WIN_HEIGHT MSG_ROWS #define WIN_WIDTH MSG_WIDTH typedef unsigned char BYTE; typedef unsigned int WORD; void GetSystemDate(WORD *Year, BYTE *Month, BYTE *Day); void GetSystemTime(BYTE *Hour, BYTE *Min, BYTE *Sec); void DrawWindow(BYTE Left,BYTE Top,BYTE Right,BYTE Bottom, BYTE Attrib); void GotoXY(BYTE x, BYTE y); void CursorOff(); void CursorOn(); WORD KeyPressed(); // Globals // Hold cursor scan lines to restore later. Could have returned from // Cursor off but prefer simple call line for this function. BYTE ScanStart,ScanEnd; #endif void main() { BYTE Month,Day,Hour,Min,Sec,PrevSec; WORD Year; DrawWindow(0,0,SCREEN_WIDTH-1,SCREEN_HEIGHT-1,BLUE << 4); DrawWindow(WIN_LEFT,WIN_TOP,WIN_LEFT+WIN_WIDTH,WIN_TOP+WIN_HEIGHT,BLACK); DrawWindow(WIN_LEFT-1,WIN_TOP-1,WIN_LEFT+WIN_WIDTH-1,WIN_TOP+WIN_HEIGHT-1,GREEN <<4); textbackground(GREEN); textcolor(BLACK); GotoXY(WIN_LEFT+3,WIN_TOP); GetSystemDate(&Year,&Month,&Day); cprintf("Date is %02d/%02d/%02d",Day,Month,Year); GetSystemTime(&Hour,&Min,&Sec); { GetSystemTime(&Hour,&Min,&Sec); if (PrevSec != Sec) // Only update every second to avoid flashing { GotoXY(WIN_LEFT+4,WIN_TOP+2); cprintf("Time is %02d:%02d:%02d",Hour,Min,Sec); PrevSec=Sec; } } // end while // Restore defaults textbackground(BLACK); textcolor(WHITE); clrscr(); } void GetSystemTime(BYTE *Hour, BYTE *Min, BYTE *Sec) { asm {XOR AX,AX MOV AH, GET_TIME DOS_INT MOV BX, Hour //GET ADDRESS MOV BYTE ptr [BX], CH //COPY HOUR MOV BX, Min MOV BYTE ptr [BX], CL MOV BX, Sec MOV BYTE ptr [BX], DH } }
1. undefined symbol _GotoXY in module
2. undefined symbol _GetSystemDate in module
3. undefined symbol _DrawWindow in module
can anyone help and how to fix them?



LinkBack URL
About LinkBacks


