how to compile odbc.c

Hello:
    I would like to know how to compile odbc.c. Do we have to use gcc 3.3.2? 

I tried 

gcc -shared ../c/odbc.c -o odbc.so -lodbc -fPIC -m32

and the compilation success, however, when running,  I got a type error.

I’m asking this because when there are non ascii in the database, and the collation is not correct, odbc.c will print “more” on screen and ignore the rest of data.

I’m not able to fix the collation problem because some of the data is really old and has different collation. 

Thanks in advance.

Figured out my self. Forget to -DKXVER=3

 

 gcc -shared  ../c/odbc.c -o odbc.so -lodbc -fPIC -m32 -DKXVER=3