From 680640163f4f65265f91c1a49f8e2d21b87c8703 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Tue, 10 Feb 2009 02:48:04 +0000 Subject: [PATCH] Fix build and declare main exter "C" --- src/crt/demo/GNUmakefile | 2 +- src/crt/demo/crttest.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/crt/demo/GNUmakefile b/src/crt/demo/GNUmakefile index e054dfaab8..b5f18ea195 100644 --- a/src/crt/demo/GNUmakefile +++ b/src/crt/demo/GNUmakefile @@ -6,4 +6,4 @@ LDFLAGS += -L../source/$(LIBODIR) -lcrt $(CIOLIB-MT_LDFLAGS) $(XPDEV-MT_LDF $(EXEODIR)/crttest: $(EXEODIR) $(OBJS) @echo Linking $@ - ${QUIET}$(CC) $(OBJS) -o $@ $(LDFLAGS) $(MT_LDFLAGS) + ${QUIET}$(CXX) $(OBJS) -o $@ $(LDFLAGS) $(MT_LDFLAGS) diff --git a/src/crt/demo/crttest.cpp b/src/crt/demo/crttest.cpp index 34f83026d4..7401fb8a46 100644 --- a/src/crt/demo/crttest.cpp +++ b/src/crt/demo/crttest.cpp @@ -104,7 +104,6 @@ void dispdacvalues () //display DAC register associated with each palette for (c0=0;c0<16;c0++) { u2=(unsigned)getpalreg(c0)%u1+(u0/256u)*u1; - /* TODO: Next line was disabled! */ //getdacreg(u2,&(char)red,&(char)green,&(char)blue); printsf(51,4+c0,0x1f," %.3d %.2Xh %.2Xh %.2Xh ", u2,(unsigned char)red,(unsigned char)green,(unsigned char)blue); @@ -158,6 +157,7 @@ void dispascii () //this file contains the 8x8 font information for changecharg example #include "crazy8.cpp" +extern "C" { int main () { int c0,c1,c2,c3; @@ -597,6 +597,7 @@ WARNING: If you are running this demo from a MS-WINDOWS MS-DOS prompt and\n\ crt_gotoxy(0,2); return(0); } +} //By M rcio Afonso Arimura Fialho //http://pessoal.iconet.com.br/jlfialho -- GitLab