Skip to Content.
Sympa Menu

freetds - Re: [freetds] Compiling tsql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Compiling tsql
  • Date: Sat, 26 May 2007 10:17:21 -0400

Tim Goossens wrote:
> I would like to adjust the tsql program to my own specific needs, so I
> want to try to compile it from tsql.c. Is this possible in a easy way,
> without using a makefile? I am currently studying the makefile, but it
> reads pretty much like gibberish.

Before you do that, I suggest you look at bsqldb and, in the current
snapshot, fisql. They both use the db-lib API, whereas tsql uses libtds
directly. It makes them easier to modify. And I think you'll find fisql
in particular is already much more functional than tsql.

tsql has a specific purpose: to test the underlying TDS implementation
independent of the client libraries that use it. For example, db-lib uses
libtds; if tsql shows a problem with a particular server or query, we know
the problem is in libtds, not db-lib.

We occasionally get patches for tsql to make it more functional. I think
it's the wrong program to "improve" because the libtds functions change
with each release. It's enough that it does what it does.

My other suggestion, since you said you're looking for the "easy way", is
to write your own Makefile from scratch. Something like this:

SRC = [the sources]
LIBS = [the libraries]
OPTIONS = [the options]

application: $(SRC) [and the .h files]
gcc -d -o $@ $(OPTIONS) $(SRC) $(LIBS)

I think you'll find that a better solution than using the command line or
writing script. :-)

HTH.

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page