This section explains the steps to compile and run the NAV tutorials from the Linux command line/command shell.
If the FairCom Database Engine is not already running on your machine, start the server. See Starting the FairCom Database Engine.
Compiling
To compile the NAV API tutorials from the Linux command line, follow these steps:
drivers/c.nav/tutorials/cmdline
>make
The c.nav tutorials are ready to run.
Type 'make run' to run the tutorials.
Running
Be sure the FairCom Database Engine is running.
To run the c-tree tutorials from the Linux command line, follow these steps from the same folder you compiled from:
>make run
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.
When running, the first tutorial should look similar to the text below:
INIT
Logon to server...
DEFINE
Open table...
Add fields...
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 . . .
See the Compile Using Microsoft Visual Studio IDE section for directions on how to use this tutorial.
Note: On systems running a glibc version older than 2.17, the tutorials need to be linked with librt by adding -lrt to the SYSLIBS macro in the makefile. If you are running a system with glbic older than 2.17, edit the makefile and uncomment -lrt.
Troubleshooting
This section lists some of the errors that can occur when compiling and running these tutorials:
ERROR: [133] - Initialize(): ctdbLogon()
The most common cause of this runtime 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 Starting the FairCom Database Engine for details.