Product Documentation

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

Previous Topic

Next Topic

Step 8 -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, then 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.ctdb") is missing / not correct.

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

* 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 c-treeDB tutorial into your source code file, build it, and then run it (with the c-tree server running as well). If that succeeds, then you know 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.ctdb\tutorials\ctdb_tutorial1.c

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

TOCIndex