LDNS on Windows, take 2

After many attempts, and just recently finding posts on Google groups from someone else trying to do the same thing (use ldns from XPCOM) it’s become obvious that linking the VC++ built XPCOM libraries with Cygwin built ldns just won’t work. The library formats simply aren’t compatible.

Since my extension obviously needs to run within VC++ built Firefox / Thunderbird, I have a couple of choices. One would be to go back to the MS DNS library and work around the bugs. That would basically mean having to parse out the raw DNS record data according to the record type – very tedious. The other way is to modify ldns to build under VC++. Since I want to be able to build and run on Linux as well, I’m taking the latter approach.

So far I’ve been able to get ldns and the associated “drill” utility to build on Windows. It’s taken a bit of modification to get to that point of course. I may have overdone it a bit. There was some evidence in ldns of support for Windows, specifically some defines related to using winsock. But this seemed far from complete and there were many other changes that were needed. I’m sure I’ve probably broken the Linux build though, so getting both platforms supported with the same source is going to need more work. But for now I’m please to have been able to get this far fairly quickly.

This entry was posted in General, LDNS, Windows. Bookmark the permalink.

4 Responses to LDNS on Windows, take 2

Leave a Reply