The V C++ GUI Reference Manual - Vers. 1.20 - 6/30/98
Copyright © 1998, Bruce E. Wampler
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.
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:
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.tarYou will then be ready to compile the 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:
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.
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.
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.
Watcom project files are found in the WATCOM directory. There are various subdirectories with different WIN32 and Win3.1 project files.
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.
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.
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.
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.