Here is the simplest example
/* minthrpc.pc */
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SQLCA_NONE
#define ORACA_NONE
#include <sqlca.h>
#include <oraca.h>
EXEC ORACLE OPTION (oraca=yes);
int main (void)
{
struct sqlca sqlca;
struct oraca oraca;
sql_context pctx= NULL;
memset (&sqlca, 0, sizeof sqlca);
memset (&oraca, 0, sizeof oraca);
oraca.oradbgf= 1;
oraca.orastxtf= 2;
EXEC SQL ENABLE THREADS;
EXEC SQL CONTEXT ALLOCATE :pctx;
EXEC SQL CONTEXT USE :pctx;
return 0;
}