Re: HOWTO compille FreeTDS under Windows
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
LacaK wrote: > > Thanks, but steps described leads to dblib.lib, but I need dblib.dll. It's easy if you know how? A DLL must provide a few functions e.g. DllMain() for the Windows linker. It must declare to the linker which functions are "exported". That's about it. Ask yourself this: how does one create a DLL from nothing? Search the Web for examples/tutorials with "Win32 dll C". In short, open the flavor-of-the-day IDE, choose something like "create a DLL project" and pretty soon, splat, you'll have boilerplate DLL code. Compile. Good. Add dblib.lib to your project, and a .DEF file naming the dblib functions (easily extracted from doc/api_status.txt). Compile again. Voila! A DLL. Supporting the Windows development environment is a bit of a nuisance -- no offence intended! -- for a free software project because the setup is so variable. I wrote the FreeTDS NMakefile specifically to compile db-lib regardless of the version of Visual Studio anyone might happen to use. I don't know now portable it really is, or if anyone uses it, but at least if problems are found it can be patched. A .dsw or .sln or .vcproj file cannot be patched, and likely as not won't work anyway. Just the other day I tried to compile APL for Windows and VS complained the project file was for a newer version. No simple remedy there. Occasionally someone suggests we post Windows binaries. Funny: hardly ever does anyone suggest that for any other OS! IMO that would only kick the can further down the road. That is, anyone using FreeTDS has to be able to compile stuff. To someone who can't figure out how to build FreeTDS, linking a precompiled binary to the application will present challenges at least as great. --jkl