-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Michael Caldwell wrote:
> Currently I'm trying to compile unixODBC, but freetds-devel does not include
> libtdsodbc.so.

Why not just use odbc32 instead?  The interface is the same, you just
need to #include <windows.h> before #include <sql.h>.  I have done with
with several packages (see libgda as an example).

> Was freetds compiled with the --with-unixodbc configure flag?
> 
> How do I compile version 0.64?

Look at the Ports version 0.63 for clues; I haven't done 0.64 yet.

> In general what's the trick for compiling a .so under cygwin/w32/dll (when
> the author doesn't explicitly resolve the references, but relies on the
> linux kernel to resolve them at run time)?

You have to track down the dependencies and add them to the link command
yourself.

> Do I need to create an import lib?

Libtool will do this for you; otherwise, yes.

> I've noticed in a couple source patches that the libtool flag -no-undefined
> is added, I've tried that, but what else do I need to do?

All symbols must be resolved at link time, period.  It can take work;
for example, KDE is notoriously bad about this, hence the big patches in
Ports (never mind the time involved).

You also need to make sure that -l flags come after all .o and .a files
in the link command; this is similar to the behaviour of -Wl,--as-needed
on current Linux systems.  See Gentoo's as-needed doc for more info.

> Btw, what's the cygwin equivalent of ldd?

Try cygcheck /path/to/foo.{exe,dll}, but the following gives more exact
information:

objdump -p /path/to/foo.{exe,dll} | grep "DLL Name:" | sort -u | cut -d
' ' -f 3 | sed -e '/KERNEL32.dll/d' | xargs -r which


Yaakov
Cygwin Ports
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF8NqbpiWmPGlmQSMRCDLeAJwNH/sopFfYi2+PD1KTP+5PxCGr0QCgujsp
gWICGycWGgAQOR+X9/q8pjE=
=baho
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general

Reply via email to