Archived

This topic is now archived and is closed to further replies.

addicted2cheese

Newb question

Recommended Posts

I am trying to start using the tutorials however i cannot figure out which code to downloadout of all these. I am using DevC-++ and tried the borland C++however that wouldent work. Can anyone help me? Thanks for your time * DOWNLOAD Visual C++ Code For This Lesson. * DOWNLOAD ASM Code For This Lesson. ( Conversion by Foolman ) * DOWNLOAD Borland C++ Builder 6 Code For This Lesson. ( Conversion by Christian Kindahl ) * DOWNLOAD Code Warrior 5 Code For This Lesson. ( Conversion by Erik Rounds ) * DOWNLOAD Cygwin Code For This Lesson. ( Conversion by Stephan Ferraro ) * DOWNLOAD Delphi Code For This Lesson. ( Conversion by Peter De Jaegher ) * DOWNLOAD Delphi Code For This Lesson. ( Conversion by Nelson Nelson ) * DOWNLOAD Game GLUT Code For This Lesson. ( Conversion by Milikas Anastasios ) * DOWNLOAD Irix Code For This Lesson. ( Conversion by Lakmal Gunasekara ) * DOWNLOAD Java Code For This Lesson. ( Conversion by Jeff Kirby ) * DOWNLOAD Linux Code For This Lesson. ( Conversion by Richard Campbell ) * DOWNLOAD Linux/GLX Code For This Lesson. ( Conversion by Mihael Vrbanec ) * DOWNLOAD Linux/SDL Code For This Lesson. ( Conversion by Ti Leggett ) * DOWNLOAD Mac OS Code For This Lesson. ( Conversion by Anthony Parker ) * DOWNLOAD Mac OS X/Cocoa Code For This Lesson. ( Conversion by Bryan Blackburn ) * DOWNLOAD MASM Code For This Lesson. ( Conversion by Nico (Scalp) ) * DOWNLOAD Power Basic Code For This Lesson. ( Conversion by Angus Law ) * DOWNLOAD Python Code For This Lesson. ( Conversion by John ) * DOWNLOAD Solaris Code For This Lesson. ( Conversion by Lakmal Gunasekara ) * DOWNLOAD Visual Basic Code For This Lesson. ( Conversion by Ross Dawson ) * DOWNLOAD Visual Fortran Code For This Lesson. ( Conversion by Jean-Philippe Perois )

Share this post


Link to post
Share on other sites
If you''re using the free Borland command line compiler, download the ''Borland C++ Builder 6 Code'' and cut the ''#include <vcl.h>'', ''#pragma hdrstop'' and ''#pragma argsused'' lines.

You may hit a few other problems in later tutorials, but they''re all reasonably easy to fix (just look at the errors the compiler gives you).

Hope this helps

Enigma

Share this post


Link to post
Share on other sites
Hrmm.. i thought it worked, turns out it didnt (long story). The Cygwin one gave me about 20 errors but the Borland with those list taken out gave me this:

153 lesson01.cpp
`CDS_FULLSCREEN'' undeclared (first use this function)
153 lesson01.cpp
(Each undeclared identifier is reported only once
153 lesson01.cpp
for each function it appears in.)
337 lesson01.cpp
ANSI C++ forbids declaration `WinMain'' with no type

Any ideas?

Share this post


Link to post
Share on other sites
CDS_FULLSCREEN should be defined in winuser.h. I assume it gets included by windows.h. You can get round this problem by just #defining CDS_FULLSCREEN to 0x00000004. The WinMain error is a bit confusing. I guess you must be using a different version of the Borland compiler to me. It may be because the source doesn''t define a return type for the WinMain function. Try changing the declaration to ''int WINAPI WinMain(...)'' and see if that fixes it.

Enigma

Share this post


Link to post
Share on other sites
ERRORS:

Visual C++:
153 lesson1.cpp
`CDS_FULLSCREEN'' undeclared (first use this function)
153 lesson1.cpp
(Each undeclared identifier is reported only once
153 lesson1.cpp
for each function it appears in.)

Borland C++: (after deletion of #pragma argsused,#pragma hdrstop and #include <vcl.h> )
152 lesson01.cpp
`CDS_FULLSCREEN'' undeclared (first use this function)
152 lesson01.cpp
(Each undeclared identifier is reported only once
152 lesson01.cpp
for each function it appears in.)
336 lesson01.cpp
ANSI C++ forbids declaration `WinMain'' with no type

Cgywin:
59 lesson1.c
implicit declaration of function `int glutSwapBuffers(...)''
66 lesson1.c
implicit declaration of function `int usleep(...)''
72 lesson1.c
implicit declaration of function `int glutDestroyWindow(...)''
83 lesson1.c
implicit declaration of function `int glutInit(...)''
90 lesson1.c
`GLUT_RGBA'' undeclared (first use this function)
90 lesson1.c
(Each undeclared identifier is reported only once
90 lesson1.c
for each function it appears in.)
90 lesson1.c
`GLUT_DOUBLE'' undeclared (first use this function)
90 lesson1.c
`GLUT_ALPHA'' undeclared (first use this function)
90 lesson1.c
`GLUT_DEPTH'' undeclared (first use this function)
90 lesson1.c
implicit declaration of function `int glutInitDisplayMode(...)''
93 lesson1.c
implicit declaration of function `int glutInitWindowSize(...)''
96 lesson1.c
implicit declaration of function `int glutInitWindowPosition(...)''
99 lesson1.c
implicit declaration of function `int glutCreateWindow(...)''
102 lesson1.c
implicit declaration of function `int glutDisplayFunc(...)''
105 lesson1.c
implicit declaration of function `int glutFullScreen(...)''
108 lesson1.c
implicit declaration of function `int glutIdleFunc(...)''
111 lesson1.c
implicit declaration of function `int glutReshapeFunc(...)''
114 lesson1.c
implicit declaration of function `int glutKeyboardFunc(...)''
120 lesson1.c
implicit declaration of function `int glutMainLoop(...)''
90 lesson1.c
`GLUT_RGBA'' undeclared (first use this function)
90 lesson1.c
(Each undeclared identifier is reported only once
___________________________________
Well thats them :-/ , any ideas?

Thanks for taking time to help me people

Share this post


Link to post
Share on other sites
Ok

1)I typed "#define CDS_FULLSCREEN 0x00000004" at the beginning of the code and this seems to have worked, thanks .

2&3)This is what i have done to this part of code to
}
WINAPI int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
return 0;
{
it got rid of the other error, but now its telling me there is a "Parse error before ''0''"on the ''return -;'' line This is the only error left other then:
339 lesson01.cpp
confused by earlier errors, bailing out

Thanks for your time

Share this post


Link to post
Share on other sites