Product Documentation

Building a Microsoft Visual Studio C++ Project for Your c-tree Application

Previous Topic

Next Topic

Step 6 -Test your new project

At this point, you should be ready to compile/build your new project. From the menu bar, select Build > Build Solution.

If the Output window says 1 succeeded, the build worked! If not, look at the first error message(s) and see if it matches any of the following:

* Cannot open source file "ctoptn.h":

Step 5, the first include (".....sdk\ctree.cpp") is missing / not correct.

* Cannot open include file: 'ctdbsdk.hpp':

* Identifier "CTDBRET" is undefined:

Step 5, the second include (".....include") is missing / not correct.

* Unresolved external symbol - "gethostname", or "WSAStartup":

Step 4, you are missing the "ws2_32.lib" dependency.

* Unresolved external symbol - "__imp_CryptProtectData" or "__imp_CryptUnprotectData":

Step 4, you are missing the "crypt32.lib" dependency.

* Unresolved external symbol “_ctdbStartDatabaseEngine” (or anything starting with "_ctdb"):

There is a problem with step 3 - you are missing 'mtclient.lib' and / or you have a 32-bit vs. 64-bit mismatch.

Once you successfully build this simple test file, an “end-to-end” test should be performed. To do that, copy the contents of the first tutorial into your source code file (leaving the #include "pch.h" line at the top of the program), build it, and then run it (with the c-tree server running as well). If that succeeds, then you know that your project can connect to the database and perform CRUD operations (record Create, Read, Update, and Delete). A typical path for the first tutorial is as follows:

C:\FairCom\V11.5.0\winX64\sdk\ctree.cpp\tutorials\ctpp_tutorial1.cpp

For information about starting the FairCom Server, see Server Quick Start in the FairCom Server Administrator's Guide.

TOCIndex