[Object Central Home]

Installation Instructions for V

The V C++ GUI Reference Manual - Vers. 1.20 - 6/30/98

Copyright © 1998, Bruce E. Wampler


V has been designed to be easily installed on many platforms. This document describes some of the details you will need to know to install V on your system. Not all systems are covered here, but there should be enough information to get you through the process.

It has been my policy to distribute V only in source format, and not include precompiled versions of the library or applications. There are two reasons for this. First, there are a bunch of C++ compilers out there, and they usually don't work together. It would take just too much effort to try them all. Second, I think getting V to compile with your compiler on your system is a good exercise. If you can get that far, then you should be able to produce a V application with few problems.

I do hope to be able to provide DLL versions for MS-Windows and shared libraries for Linux systems in the near future.

1.  Obtaining V

The main sources of the V library is found at the Object Central Internet site, www.objectcentral.com. You can obtain the files either from html links on the Object Central web page, or you can download them directly from the Object Central ftp site, objectcentral.com, via anonymous ftp.

The files of interest:

v-1.18.tar.gz
Gzipped tar file of the Full V version for X and MS-Windows. This includes all source code for X and MS-Windows, and source form of documentation for all versions. (PostScript and HTML files are included in separate archives.)

vwin118.zip
DOS ZIP format archive of Windows version. This distribution includes code for Windows 3.1 and Win32 (suitable for NT and Windows 95). It does not include the documentation.

vos2-117.zip
DOS ZIP format archive of OS/2 version. This distribution includes a standalone distribution for OS/2. Since it is being developed separately, it will not always by in sync with the X and MS-Windows versions.

vref118.ps.gz
Gzipped PostScript file of V Reference Manual.

vref118.html.tar.gz
Gzipped tar format of the HTML version of V reference manual. This is suitable for loading to a Windows platform and viewing with a browser such as Netscape.

If you are downloading to a MS-Windows system, you might need to change the file names to something more compatible with Windows.

2.  Unpacking V

The V distribution files are either in ZIP format, a common format used on MS-Windows, Gzip format (GNU ZIP), or Gzipped tar format. Tar is a archive utility with Unix origins.

If you already have a version of ZIP, gzip, or tar, you are all set. If you run on a Unix platform, you will have gzip and tar. Free versions of gzip and tar are available at the Object Central ftp site under the dosutils directory. Download those utilities, and then unpack and unarchive the V files. After copying the distribution files to the parent directory of where you want to install V, (the files are unpacked to a /v directory), use the following procedure (replace with the correct file name):

    gunzip vref-118.html.tar.gz
    tar xvf vref-118.html.tar
You will then be ready to compile the distribution.

3.  Organization of the V Distribution

The V directory structure has been designed to allow you to either install V in a personal directory, or at a higher system level. This will let you define appropriate search paths for the V header files to your compiler - e.g., your IDE or Makefile.

The file hierarchy is:

/v
The main V directory.

/v/appgen
V application generator program.

/v/bccide
MS-Windows build files for Borland C++.

/bmp2vbm
Source for a simple MS-Windows and OS/2 .bmp bitmap format to .vbm V bit map format converter.

/v/bin
The /bin directory is used to hold the binaries of V sample programs. No binaries are included on the distribution, but most appropriate subdirectories for various architectures and platforms should be created by the unpacking process.

/v/doc
The sources for V documentation. The documentation is in LATEX format. The standard distribution includes only the source LATEX files. Other versions, including HTML and Postscript, are available from the V ftp site.

/v/draw
Source for the VDraw example program. Examples that are identical across platforms use a .cpp file extension.

/v/drawex
Very simple V draw example from C/C++ Users Journal article.

/v/examp
Source for a simple V example.

/v/includex/v
Source for the X *.h V header files.

/v/includew/v
Source for the MS-Windows *.h V header files.

/v/include2/v
Source for the X *.h V header files. (Only included in OS/2 distribution.)

/v/lib
Compiled version of the V library will be placed under appropriate subdirectories here. No precompiled libraries are included in the standard distribution.

/v/mingw32
Files needed for mingw32 compiler.

/v/msvc
Project and make files for Microsoft VC++.

/v/obj
Compile object code is saved under here.

/v/srcx
The full C++ source for the X V library. The files use a .cxx extension.

/v/srcwin
The full C++ source for the Ms-Windows V library. The files use a .cpp extension.

/v/src2
The full C++ source for the OS/2 V library. The files use a .cpp extension.

/v/test
The test program used to test V functionality.

/v/texted
Source for a simple editor based on vTextEdit class.

/v/tutor
The source code for the tutorial example.

/v/vxgl
Source for V canvas class that interfaces to X version of OpenGL.

/v/watcom
Project and make files for Watcom C++ compiler.

4.  Compiling: MS-Windows

Believe it or not, all the object code generated by the various compilers available for Windows is incompatible across compilers! This means it is not practical to distribute V already compiled for every compiler avaiable. For one thing, I just can't afford to buy that many compilers.

This incompatibility means two important things.

First, you must compile V with your compiler. I've tried to supply project or make files required for the major compilers, but not all are available.

You must be very careful about the compilation model you specify. For Windows 3.1, the best model is usually called Large. While WIN32 doesn't have the memory model problem, it does have calling convention and data alignment problems. You MUST be careful to compile the V library AND your own applications using the same memory model or calling conventions. These options are usually buried somewhere on an options menu. I can't provide exact information about this. It is your job to understand your compiler enough to do this.

I've selected a calling convention for the V project files I provide. You should check what they are, and be sure they match. I don't think they are always the default settings.

For example, the WIN32 version for the Borland compiler requires that word alignment be used. The default is byte. The project examples supplied have generally had their options set as required. You should examine the settings, and use the same ones for your applications. You cannot mix compilers or even compiler code options.

The standard distribution includes subdirectories for each compiler: Borland (/bccide), Microsoft (/msvc), Watcom (watcom), and mingw32 (mingw32). For the IDE based versions, you should be able to use the project files to get started. For the mingw32 distribution, please read the rdmw32.txt file in the /mingw32 directory.

4.1  mingw32

The mingw32 compiler is becoming the öfficial" V compiler. Since it is free, the V distribution will be kept in sync with the latest mingw32 version. It is currently compiled in a DOS window. You may find it easier to place the V header files directly under mingw32: e.g., /mingw32/include/v. Building V with mingw32 is more like building under Unix. It uses a special version of the Config.mk file and the same Makefiles for the example applications. The only tricky thing about mingw32 at the moment is that the files must be extracted in such a way as to preserve filename case. Using gzip and tar to extract the full v-1.18.tar.gz file is probably best.

4.2  Borland C++

Windows specific files for Borland 5.0 are kept on BCCIDE. That directory includes .IDE files for Borland C++, .RC, .DEF, and .ICO files. The project files assume that BCC is on drive C:. If you have BCC 4.5, or keep BCC on a drive other than C:, then you will have modify the project files to change the include file search paths. Note that the BCC 5.0 project files only work for WIN32. I couldn't get BCC 5.02 to compile the 16 bit version. There is a project file for BCC 4.5 that builds a 16 bit version.

4.3  Watcom

Watcom project files are found in the WATCOM directory. There are various subdirectories with different WIN32 and Win3.1 project files.

4.4  MS Visual C++

This distribution now includes make/project files for Microsoft VC++. There are 16 bit versions for MSVC 1.52, and for MSVC 4.0, which were built using the cheap Standard Edition. They should be compatible with the expensive later version.

4.5  Other Compilers

If you want to compile V with a different compiler, it isn't too hard. To build the library, you include ALL the files in the v/srcwin directory. Specify v/includew in the include search path. V has been designed to work only with the LARGE model for Win3.1. It works with whatever calling convention you need for WIN32.

The djcpp version seems to have difficulty compiling V.

5.  Compiling: Unix, Linux

A series of Makefiles is included with the V distribution to build the library on various Unix systems. In the main /v directory is a file called Config.mk which usually needs to be customized before building. Actually, there are two versions of Config.mk supplied: ConfigX.mk for the Athena widget based version, and ConfigM.mk for the Motif widget based version. Before you compile, you should copy the appropriate file to Config.mk, edit Config.mk for your system, then type make from the /v directory.

The Config.mk file, and the various Makefiles contain lots of comments about building V on your platform. Please read those files directly for more critical information about getting V working on your system.

6.  Compiling: OS/2

Directions for compiling on OS/2 are included in the OS/2 distribution. Since the OS/2 version was just released, there are not as many prebuilt project or makefiles available. The mingw32 files should serve as a good basis for the EMX compiler. As users contribute feedback, this situation should change.


[Object Central Home]