Developer Guide |
|
Building a Microsoft Visual Studio C++ Project for Your c-tree Application |
|
Audience: |
Developers |
Subject: |
How to build a new Microsoft Visual Studio C++ project connecting to the FairCom Database Engine |
Copyright: |
© Copyright 2024, FairCom Corporation. All rights reserved. For full information, see the FairCom Copyright Notice. |
This guide is intended for developers who wish to create a Microsoft Visual Studio project for their C / C++ c-tree application program by hand, starting from scratch, so they understand exactly what is in the project file and how the project is configured.
For those who are not interested in this level of detail, it is easier to create a Visual Studio project for your c-tree application by copying one of the c-tree tutorials (project files and all) and then modifying the files to suit your needs.
Overview - To configure a new Visual Studio project to use c-tree, the project must be told where to find the c-tree header (.h/.hpp) files. Also, the following library (.lib) files need to be included as project dependencies:
The first three .lib files listed are included with the c-tree distribution, and the last two are included with Visual Studio / the Windows SDK.
Prerequisites - This guide assumes that FairCom DB and Microsoft Visual Studio (C/C++) have previously been installed on your development computer.
c-tree Operational Models - Your application program can attach to the c-tree DB engine in several ways, which are called “operational models.”
The default operational model is “client/server” in which your application acts as a client that communicates with a c-tree database server running as a separate process. In this model, you compile the client library into your application, which is mtclient.lib. The client communicates with the database server over shared memory when both run on the same server, and communicates over TCP/IP when they run on different servers. This is the default model that is explained in this document.
Other operational models embed the c-tree database engine into an application. These models are explained in other documents. They provide you with the ability to link the database server statically or dynamically into your program. There is also a non-server edition of the database that can be linked into your application.