This guide shows you how to build the networking libraries
in the QUANTA distribution for WIN 98/NT/2000/XP.
Table of Contents
- System Requirements
- Building the QUANTA libraries
- Building your own application
- Appendix A : Directory
B : A note on 'pthreads' and 'windowsthreads'
- Appendix C: Building the QUANTA libraries using
Visual Studio 7.0 or Visual .NET
- Appendix D: Instructions to install Quanta using the QuantaSetup installer
The networking modules of QUANTA were tested on Windows 95/98/NT/2000/XP.
You will need Microsoft Visual C++ 6.0 or a later version.
Building the QUANTA libraries
The process has 2 main steps.
1.Downloading the distribution into a working directory
a. Download the QUANTA_xxx file to a working directory (where xxx is
the version number).
b. Extract all the contents of the file into your working directory.
If your working directory is
C:\QUANTA, then you will see the distribution in
C:\QUANTA\QUANTA_xxx. (where xxx is the version number of the distribution).
Note : A brief description of the directories in the distribution
is available in Appendix
Go to step 2 to build the QUANTA library.
2. Building the QUANTA libraries
a. Open the workspace QUANTA.dsw. You can find the workspace QUANTA.dsw
Note: Advanced users, see Appendix
B for a note on the two different thread libraries with which QUANTA
libraries are built.
b. From the menu choose Build->Batch Build->Build.
The networking libraries are now ready for use. Go to the demo programs.
The demo programs are a set of sample programs located in the
'demos' sub-directory of the distribution.These demo programs are strictly
for QUANTA's networking APIs. The demo programs exist in four directories
under the demos sub-directory (db, network, misc, threads). A 'README'
file in each directory (located in the 'docs' sub-directory) describes
the demo programs. The demo programs are built automatically during Batch Build.
To Run the demos, you have to add the path to the pthread.dll
file. If your current working directory is C:\QUANTA\QUANTA_X.X, you can
set the path by doing the following steps
Note :see Appendix
B to know about pthreads and windows threads
- Go to Start Menu ->Control Panel -> System. Choose Environment tab.
- Set Variable name as 'path'. Set Value = %path%;C:\QUANTA\QUANTA_X.X\WIN32\pthreads\bin
Look into each directory and use the README file to understand
how the demos should be run.
your own application
You can create new applications with QUANTA.
Using Visual C++ IDE
- Create a new project.
- Go to Project Settings and click on the C/C++ tab.
Select Preprocessor as the Category.
In the Preprocessor definitions textbox add:
This definition resolves the incompatibilities resulting from both
winscok.h and winsock2.h being included when compiling with QUANTA. Files should include windows.h rather than directly including winsock2.h
In the Additional include directories textbox add :
(required only if you want to use pthreads)
(Note : C:\QUANTA is the deployment
directory used in our example)
- Go to Project Settings->Link->Category:Input->Object/Library
add quanta.lib, pthread.lib (If you want to use pthreads).
In the Additional library path textbox add :
- Add all your other files to the project and build it.
Note: If winsock libs are not part of your default setting, you
also need to link with ws2_32.lib
If you have any problems, questions, or feedback please send email
A : Directory Structure
The QUANTA distribution is organized into several sub directories.
Each sub directory is described below.
||contains sample programs that use the QUANTA networking APIs.
||contains header files for QUANTA
||contains performance monitoring daemon server and a simple performance
||contains source code for QUANTA
||contains the workspace, projects for WIN32 and the pthreads library
||contains the workspace and projects for WIN CE
B: A note on 'pthreads'and 'windowsthreads'
The QUANTA libraries can be built with two different flavors for windows:
one uses 'pthreads'and the other uses the native windows threads. By
default, the library is built using pthreads.
The pthread library is an open source project and is currently maintained
An application built with the pthread version of QUANTA needs to execute
This file can be found in the same location as the pthread version of
ie. C:\QUANTA\win32\pthreads\bin - where C:\QUANTA is the deployment
directory described in
Building and Installing
QUANTA Libraries Step 2
The pthread distribution is also available in the subdirectory WIN32.
For more information visit http://sources.redhat.com/pthreads-win32
The native window threads is bundled alongwith the Windows operating
system. If you would like to build QUANTA with windows threads then
do the following steps.
- Open the file QUANTAconfig_win32.hxx under the include/QUANTA sub-directory.
- Change the line QUANTA_USE_PTHREADS to QUANTA_USE_WINDOWSTHREADS.
- Select Build->Batch Build. Select all the projects and
click on 'Build'
The QUANTA library built with native windows threads can be found in
Appendix C: Building the QUANTA libraries using Visual Studio 7.0 or Visual
Building the QUANTA library and demo programs
Open the workspace QUANTA.dsw. You can find the workspace QUANTA.dsw
If you are using Visual Studio 7.0 or Visual .NET, you may be prompted
to modify the workspace to make it compatible with the new environment.
Click 'Yes' on all the dialog boxes that follow.
Select Build->Batch Build. Select all the projects. Click on 'Build'.
The above steps should build the Quanta libraray and the demo programs.
Appendix D: Instructions on how to install Quanta using QuantaSetup Installer
Click on the link "QuantaSetup" on the download page. You will be prompted
with two choices: 1. Open the file from the same location, 2. Save the
file to the disk. You can choose either one of the options and click
OK. The self-extracting installer will extract the necessary files
and will run the setup program automatically. Follow, the instructions
and finally, click on the Finish button to complete the installation
Building the Quanta library
Click on the Windows Start Menu->All Programs->Quanta->Quanta
Select Build->Batch Build->Build All.
The above steps should build the Quanta library and the demo programs.