NobleUplift NobleUplift - 1 year ago 144
C Question

How do I generate a manifest file for libxml2.dll built on Windows?

I successfully compiled libxml2 on Windows after compiling libiconv:

And following this tutorial:

And now I'm trying to generate a manifest file for libxml2.dll. How do I do this? I've Googled around and it says to create the manifest file in Visual Studio, but I'm compiling from the command line. This is the script I used to build it:

CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
CD libxml2-2.9.4\win32
cscript configure.js compiler=msvc prefix=D:\Repos\libxml2\release include=D:\Repos\libiconv\release\include lib=D:\Repos\libiconv\release debug=yes
REM "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
nmake install
cd ../..

I get a "Module not found" exception on this line of my plugin, and I confirmed it was an issue with libxml2.dll because using a downloaded binary of the libxml2.dll, it works just fine.

Any and all help appreciated. I'm almost finished with this project that I've had bouncing around since 2011.

working libxml2.dll is on the left, broken libxml2 is on the right

libxml2.dll on the left works. Compiled libxml2.dll is on the right. It turns out the libxml2 being compiled doesn't have a zlib1 dependency, which might be the issue.

Answer Source

After running cscript configure.js and before running nmake, edit the generated Makefile and add /MANIFEST to LDFLAGS.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download