How to make a program against the libcalcconv library


You will find in the test folder of the library source archive a test/example program which uses this library.
Below is a light version of this program to make it clearer:
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include <calcconv.h>

int main(int argc, char **argv)
{
  char ti92_varname[9] = {};
  char *utf8;

  utf8 = calcconv_varname_to_utf8(CALC_TI92, ti92_varname, -1);
  printf("UTF-8 varname: <%s> (%i)\n", ti92_varname, (int)strlen(ti92_varname));
  g_free(utf8);
}
Compile this program with:
gcc -Os -g -Wall -Wextra `pkg-config --cflags --libs calcconv` example.c -o example
That's all!

Return to the main index