I develope C on linux connect TimesTen. I had problem can't connect client/server because I didn't understand library on TimesTen more.
Thank You Chris Jenkins (Director, Solution Architectures, Oracle) for idea.
When we need to write C code connect to TimesTen [TimesTen has the TT library that is linked to the application], we have two choice;
- direct mode
use libtten.so library.
use libttclient.so library.
When we write C code, we'll create Makefile file for make code:
INSTDIR = /oracle/product/TimesTen/ttmb
COMMDIR = $(INSTDIR)/demo/common
CC = gcc
PLATCFLAGS = -Os -finline-functions
INCS = -I$(INSTDIR)/include -I$(COMMDIR)
CSDEFS = -DTTCLIENTSERVER
CFLAGS = $(PLATCFLAGS) $(INCS)
TTLINK = -L$(INSTDIR)/lib -Wl,-rpath,$(INSTDIR)/lib
DCLIBS = $(TTLINK) -ltten $(EXTRALIBS) # For Direct Mode
CSLIBS = $(TTLINK) -lttclient $(EXTRALIBS) # For Client/Server
PROGS = test3
rm -f $(PROGS) *.o
$(CC) -o $@ $(LDFLAGS) test3.o $(CSLIBS)
$(CC) $(CFLAGS) -o $@ -c test3.c