[freetds] (no subject)

Weible, Jason jasonm.weible at nextiraone.com
Tue Mar 8 14:00:15 EST 2005


I'm new to FreeTDS in general so forgive me if this has already been covered.  I couldn't find a reference to my specific problem in either the FAQ or User's Guide.  

I have installed freetds on a Solaris 7 machine and I use the gnu gcc compiler (version 2.95.2 which is ancient I know).  I'm trying to connect to a MS SQL server running on our LAN.  When I test with tsql, I can connect and query the database without problems.  When I compile my code it compiles fine but I get a "libsybdb.so.4: open failed: No such file or directory" run-time error immediately when I run it.

I've added the freetds path to both $SYBASE and $LD_LIBRARY_PATH environment variables.  My makefile looks something similar to:

PROGRAM	= program.exe
BINDIR	= .
SRCDIR	= .
APIDIR	= /usr/local/remedy/api
SYBASE	= /usr/local/freetds
CC 		= /usr/local/bin/gcc
CFLAGS	= -g -DSUN -D_REENTRANT
INCLUDES	= -I$(SRCDIR) -I$(APIDIR)/include -I$(SYBASE)/include
LIBFILES	= -L$(SRCDIR) -L$(APDIR)/lib -L$(SYBASE)/lib
ARCHLIBS	= -lm -lnsl -lxnet -lsybdb -lpthread -lar


all:	$(PROGRAM)

$(PROGRAM):	<all the .o files> program.cpp
	$(CC) $(CFLAGS) 	<all the .o files> program.cpp 
				$(LIBFILES) $(INCLUDES) $(ARCHLIBS) -o $(BINDIR)/$(PROGRAM)


The libsybdb.so.4 file does exist in /usr/local/freetds/lib as a pointer to libsybdb.so.4.0.0.  Just in case I was missing something, I also copied it into my local directory so it would have been included as part of the -L$(SRCDIR) part.   

I have the feeling that it is probably something simple that I'm missing but I just can't see it.  I never had problems when I was using Sybase sybdb library file trying to attach to a local Sybase database and I have never had a library problem attaching to a Remedy database. 

Any help would be greatly appreciated.




More information about the FreeTDS mailing list