Hi, I am trying to compile a program but I am getting following error: D:\NASMPR~1\mz2>gcc main1.c E:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.tex t+0x104): undefined reference to `winm...@16' collect2: ld returned 1 exit status
The program is given below: #define WHITE_TXT 0x07 void K_clear_screen(); unsigned int K_printf(char *message, unsigned int line); //void update_cursor(int row, int col); K_main(){ K_clear_screen(); K_printf("Hi\n How is this for a starter OS?",0); } void K_clear_screen() { char *vidmem=(char*) 0xb8000; unsigned int i=0; while(i<(80*25*2)) { vidmem[i]=' '; i++; vidmem[i]=WHITE_TXT; } } unsigned int K_printf(char *message, unsigned int line){ char *vidmem=(char *) 0xb8000; unsigned int i=0; i=(line*80*2); while(*message!=0) { if(*message=='\n') { line++; i=(line*80*2); *message++; } else { vidmem[i]=*message; *message++; i++; vidmem[i]=WHITE_TXT; i++; } } return 1; } Can somebody plz help me with this. Zulfi. -- View this message in context: http://www.nabble.com/Compilation-error-tp24585311p24585311.html Sent from the gcc - Gnu Help List mailing list archive at Nabble.com. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus