Recently I was asked some questions on CVS and SVN, and about a missing 'windows.h' file. Since the answers may assist others, I have put up my reply as this web page.


CVS - The development of  the Concurrent Versions System seems to have ceased, as this pages points out. So my 'old' WIN32 version can be downloaded from here, and that page also gives a then current link.

SVN - The development of Subversion seems ongoing, and you can find the link here.


Q 1.- difference CVS and SVN?
Q 2.- CVS only it run under DOS?
Q 3.- is possible use one command that download all files?

Simple answers :-
A 1.- These are very different source systems.
A 2.- Yes, CVS is a command line tool.
A 3.- Hmmm, yes and no. Not sure of the question.

Longer answers:

CVS and SVN are two different source systems that do about the same job. CVS has been around for a long time. SVN is newer. Which to use DEPENDS entirely on what the source server is using. Some still use CVS while others use SVN ...

For example, SimGear and FlightGear (source and data) use CVS to store the sources. OpenAL, PLIB, OpenThreads all use SVN. Each online source has made this choice, either CVS or SVN ...

You only need to use CVS or SVN if you want to download, or update the LATEST development source.

Most sources can also be downloaded as tar.gz (or zip) files. Using tar.gz (or zip) files is an ALTERNATIVE way to get a recent source, but I always use the CVS/SVN latest sources.

So this is your CHOICE.

For the very latest DEVELOPMENT (HEAD) sources, then SVN and CVS must be used. And yes, they are command line (DOS like) tools. I know there is a WinCVS, but have never tried this GUI version.

The FIRST time you use CVS or SVN to CHECKOUT (download) a source, it creates a folder, and downloads all files to that folder. This can take a little bit of time, depending on the size of the particular source.

After the initial CHECKOUT has been done, then you must change INTO the particular folder, and do an update. Then the CVS or SVN checks your local files against those on the source server, and ONLY downloads those that have changed. This update is quite quick.

To run these command line tools, a value for CVSROOT MUST be set in the environment. Since I do all CVS/SVN updating into a base folder called C:\FGCVS, then that is what CVSROOT is set to, like -

command prompt> set CVSROOT=C:\FGCVS

This base folder, C:\FGCVS then contains multiple sub-directories, one or more for each source, like SimGear, FlightGear\source, FlightGear\data, OpenAL, OpenSceneGraph, etc, etc ...

Searching around each source site, you can find the CVS or SVN commands to checkout (download) that particular source. They are different for each source.

Sometimes you have to ADD '/trunk' to the command shown, to ONLY download the 'trunk' ... they can have more than one set of sources.

(a) CVS has 2 commands - a login, with password, then a checkout.

For example, from the FG page :-

There are the two(2) CVS commands to be run :-

1. When asked for the password, use : guest

C:\FGCVS\FlightGear> cvs -d login

2. Then the source checkout, note the 'co', and it will be put it in the folder 'source' ...

C:\FGCVS\FligthGear> cvs -d co source

This will create a FOLDER called 'source', and download the full source to that folder.

(b) SVN just has a single checkout (download) command, no login.

Like from the OSG page :-

The single SVN command is :-

C:\FGCVS> svn checkout OpenSceneGraph

This will create a FOLDER called 'OpenSceneGraph', and download the full source to that folder.

When the complete source has been downloaded, then later to UPDATE each source, you change into the folder of the particular source, and run an 'update' command, using either CVS or SVN, as appropriate for that source.

For CVS, the update command is :-

C:\FGCVS\FlightGear\source> cvs up -dP

For SVN, the update command is :-

C:\FGCVS\OpenSceneGraph> svn up

Note, in each case this update is done while IN the particular folder of the source, and this must be AFTER you have set CVSROOT in the environment.

Q 4.- configuration is VISTA and MSVC8 - ok.
Q 5.- compile freeglut - missing 'windows.h'.

Compiler ERRORS like :-

e:\fg0910-2\freeglut\include\gl\freeglut_std.h(48) : fatal error C1083: No se puede abrir el
archivo incluir: 'windows.h': No such file or directory ...

This shows the file 'windows.h' is MISSING! The file windows.h comes from the MICROSOFT PLATFORM SOFTWARE DEVELOPMENT KIT (PSDK) ... the LATEST PSDK version is -> Microsoft Windows Server 2003 R2 Platform SDK ...

(a) Have you DOWNLOADED and installed this PSDK? This can be downloaded from :-

This is the WEB INSTALL interface, which requires validation that you are running a 'genuine Microsoft Windows' ...

Or from :-

(b) If you HAVE already installed this MS PSDK, then the file 'windows.h' should be found in a path somewhere like :-

C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\

This path MUST be in, or added to, put in MSVC8!

Open the menu Tools -> Options ... and in the Options dialog, expand the +Project and Solution, select the 'VC ++ Directories' on the left, then at the top right, in 'Show directories for:', select 'Include files', and this should show a list like the following :-

C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include

You can see the last entry is the path to the PSDK windows.h file.

With the PSDK installed, and the PATH to the windows.h file in MSVC8, then the compile should continue without this 'missing file' error ...

Hope this helps.

Sunday, August 26, 2007.


checked by tidy  Valid HTML 4.01 Transitional