In most cases, you only need the binary downloads to run things, but the source downloads usually include example programs that are very useful for educational purposes.
You'll eventually need to know the file paths to where the .h and .lib files are located. I recommend creating a graphics subdirectory (e.g., C:\graphics) for these to keep things tidy.
Thanks to Jose Renteria for the info on setting up Visual C++ 6.0.
get the W32 version from ftp://ncmir.ucsd.edu/pub/xforms/NT/W32/. There are several windows ports of xforms, but this is the one to use with using Visual C++. Download either the bxform-088.tgz (same as a tar.gz file) or the bxform-0881.zip file. Open the ftp://ncmir.ucsd.edu/pub/xforms/NT/W32/Xlib folder and download minx11.zip. Download and unpack all the archives to your C:\graphics directory. Copy the forms.dll file to a directory in the system's path (e.g. C:\WINNT\system32). Note that you'll be running the fdesign.exe in bxforms881-w32/DESIGN (not the one in minx11/usr/bin).
set DISPLAY=127.0.0.1:2.0. Under Win 2000 (& NT?), right click on the
My Computer icon on your desktop.
Select the advanced tab, and click on the environment variables button.
Enter DISPLAY as the name of the
variable, and 127.0.0.1:2.0 as its value.weirdx.windowmode=RootlessWM line.weirdx.windowmode=InBrowserOpenGL: If you're using Visual C++ 6.0, OpenGL comes with it, so there's nothing to worry about. Glut: A windows port of glut can be obtained from Nate Robins (www.cs.utah.edu/~narobins/glut.html ). Download and unpack it to your C:\graphics directory.
Configuring Visual C++ 6.0Test your setup by creating a new project:
- Add the include directories for Xforms and Glut to the preferences: From the visual c++ menubar click on Tools->Options then click on the Directories tab and select the "Include files" in the"Show directories for" field add the xforms and glut directories you created earlier.
- Add the lib directories for Xforms and Glut to the preferences: From the same options panel, select the "Library files" in the "Show directories for" field add the xforms and glut lib directories you created earlier.
- IMPORTANT STEP FOR EACH NEW PROJECT: add the needed .lib files:
A)Click Project->Settings
B)click the link tab
C)add forms.lib glut32.lib opengl32.lib to the "Object/library modules" and hit OK
- Click on the Projects tab (should go there automatically) and select win32 Console Application (unless you want to program Windows code).
- Then give the Project a name and choose "an empty project"
- Click on the fileView tab in the workspace browser and expand the files selection.
- Click Project->Add to Project (at this point click Files to add a previously created file to the project OR click New to make a new file (which we won't do for this example).
Build and ExecuteNOTE: if you get errors like...
Linking...
MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _tolower already defined in
LIBCD.lib(tolower.obj)
Then
A)Click Project->Settings
B)click the C/C++ tab
C)add /MD to the end of "ProjectOptions" and hit OK
D)Build and ExecuteAND THAT SHOULD BE IT...
Good luck!
Some general advice for alternative setups is to build the examples
that come with the packages. If the examples aren't working, it's
highly unlikely that the assignments will.
If you don't have access to the OpenGL implementation that comes with Visual C++ 6.0, you can try Mesa, a free OpenGLimplementation (www.mesa3d.org). I believe that cygwin also comes with OpenGL (Mesa?).