Newb question

Started by
13 comments, last by addicted2cheese 21 years, 5 months ago
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 )
Advertisement
I''d give the Cygwin version a go, because they''re both based on GCC.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
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
I tried the Borland approach and that worked, thanks both of you
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?
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
hmm.. sorry for the confusion but im using the Dev C++ compiler not the Borland compiler :-/
Could you post all of the errors? Chances are you can fix some small thing and it''ll magically work.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Try to use the VC code, usually I don''t have much trouble at all using VC code, in DevC++, as long as there is no DX stuff
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

This topic is closed to new replies.

Advertisement