facebooklinkedinrsstwitterBlogAsset 1PRDatasheetDatasheetAsset 1DownloadForumGuideLinkWebinarPRPresentationRoad MapVideofacebooklinkedinrsstwitterBlogAsset 1PRDatasheetDatasheetAsset 1DownloadForumGuideLinkWebinarPRPresentationRoad MapVideo

Btrieve 2 SDK Setup for C/C++

Btrieve 2 works with any project configuration, and the included libraries support both 32-bit and 64-bit projects. The only adjustments required for project properties are to link the correct headers and libraries in the project so they are visible to the compiler and linker.

Notice that there are two libraries.

  • btrieveCpp.lib is the C++ class library, which is a wrapper around the implementation defined in btrieveC.lib, and must be listed as an additional dependency in the linkage editor settings.
  • btrieveC.lib is the C library that contains the implementation and talks directly to the database engine. It is omitted from the additional dependency list since it is a dependency of btrieveCpp.lib.

The 32-bit and 64-bit libraries themselves have the same names, btrieveCpp.lib and btrieveC.lib, but are provided in the SDK package under the win32 and win64 folders, respectively.

Since the same headers apply to all configurations, the include folder is much simpler.

Both headers are required to be present, though only the first, btrieveCpp.h, is included directly, while the second is included indirectly.

  • btrieveCpp.h corresponds to btrieveCpp.lib, and is directly included in your program.
  • btrieveC.h corresponds to btrieveC.lib, and is included indirectly via btrieveCpp.h. As well as the C functions that comprise the core of the API, it defines enumerations, such as btrieve_status_code_t, that are common to both C and C++ programs.