cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting.cpp sample program fails

Former Member
0 Kudos
2,348

Hi, I have installed SQL Anywhere 16(sa16developerlinux) in my linux 32-bit machine - Red Hat Enterprise Linux Server release 5 (Tikanga)

I compiled sqlanywhere16/sdk/dbcapi/examples/connecting.c and getting the error message - "Failed to initialize the interface! Supported version = 2".

My make file content is:

CC=gcc CFLAGS=-I. DEPS = sacapidll.h OBJ = connecting.o sacapidll.o LIBS=-ldl

%.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS)

connecting: $(OBJ) gcc -o $@ $^ $(CFLAGS) $(LIBS)

Corresponding line in connecting.c causing this error is - if( !api.sqlany_init( "MyAPP", SQLANY_API_VERSION_1, &max_api_ver )). I tried with SQLANY_API_VERSION_2 also, but still getting same error.

Does anyone know how to correct this problem?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

Hi All, Plz ignore my question, I got this issue resolved. Rootcause - SQLANY16 environment variable was not set.

Thanks