This section explains the steps to compile and run the ISAM C tutorial from the Microsoft Visual Studio Developer Command Prompt window (also called the Native Tools Command Prompt window).
This section is oriented toward a command-line running on Microsoft Windows. The principles are similar for all other environments, such as Unix. For instructions regarding other build environments, see the other sections in this chapter.
Visual Studio 2017 > X64 Native Tools Command prompt for VS 2017
Where 2017 is your version of Visual Studio and X64 is for a 64-bit version of the FairCom product (note “64” in the name of the default installation directory) or X86 for a 32-bit version of the FairCom product.
Warning - If the Developer Command Prompt Start menu entry does not specify a bit depth, it will open the 32-bit version of the Developer Command Prompt.
For more details, see the Microsoft Developer Command Prompt web page.
This batch file will determine the version of the Microsoft C compiler you are using and will set the internal paths accordingly. It will then compile the tutorial included for this driver.
After the tutorial has been built, the batch file will run it.
If you see a c-tree error, you can look it up in the Error Code Reference. See the "Troubleshooting" section below for solutions to common problems.
The tutorial should look similar to the text below when running:
INIT
Logon to server...
DEFINE
Open table...
Create table...
MANAGE
Delete records...
Add records...
Display records...
1000 Bryan Williams
1001 Michael Jordan
1002 Joshua Brown
1003 Keyon Dooling
DONE
Close table...
Logout...
Press <ENTER> key to exit . . .
isam_tutorial1.exe
devenv isam_tutorial1.exe
Hint: A better way to single-step and debug is to open the Visual Studio solution provided. See Compile Using Microsoft Visual Studio IDE.
Troubleshooting
This section lists some of the errors that can occur when compiling and running these tutorials:
cl.exe not found! Please set environment for Visual C/C++ compiler.
The most common cause of this error is running the BuildTutorials.bat file from a DOS shell or normal Windows command shell rather than from the Visual Studio Developer Command Prompt window.
ERROR: Initialize(): InitISAMXtd()
isam_err = 133, isam_fil = 0, sysiocod = 0
The most common cause of this error is that the FairCom Database Engine is not running. Remember that the c-tree evaluation license times out after 3 hours, so the server might have exited and needs to be re-started. See Setting up the FairCom Database Engine for details.