From: drfter AT my-dejanews DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: game programming Date: Mon, 28 Dec 1998 20:53:07 GMT Organization: Deja News - The Leader in Internet Discussion Lines: 57 Message-ID: <768r3i$5kk$1@nnrp1.dejanews.com> References: <368603C8 DOT C7BDF4CA AT kolumbus DOT fi> NNTP-Posting-Host: 206.107.102.2 X-Article-Creation-Date: Mon Dec 28 20:53:07 1998 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95) X-Http-Proxy: 1.1 x13.dejanews.com:80 (Squid/1.1.22) for client 206.107.102.2 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi Samu, It's been a while since I've done 'C' programming, but here goes.... :) 1) I think this program was written for a 16 bit DOS environment, where there are both 'near' and 'far' pointers to memory. DJGPP is a 32 bit DOS protected mode environment. Therefore, I think it would be appropriate to remove the "far" pointer references in your code. 2) As to the error in main(), try coding it like this: main() { Hope this works for ya... Larry In article <368603C8 DOT C7BDF4CA AT kolumbus DOT fi>, Samu Naukkarinen wrote: > I have bought a book called "Tricks Of The Game Programming Gurus". > This book includes lots of examples. What's the problem, because > no one of the examples don't compile. The author says that all examples > will compile with DJGPP. I have tested couple of versions, but > both give same errors. What should I do? > > Is the problem in source code or in the compiler? > Here is one example: > unsigned char far *video_buffer = (char far *)0xA0000000L; // vram byte > ptr > unsigned int far *video_buffer_w= (int far *)0xA0000000L; // vram word > ptr > > void main(void) > { > Here is error list: > > line 65: parse error before '*' > line 65: parse error before 'far' > line 66: parse error before '*' > line 66: parse error before 'far' > in function 'main': > line 196: warning: return type of 'main' is not 'int' > > Thanks, > Samu > > -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own