[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] libiconv 1.11.1 - MS VS 2005 and manifest files

From: Milan Gornik
Subject: [bug-gnu-libiconv] libiconv 1.11.1 - MS VS 2005 and manifest files
Date: Wed, 26 Dec 2007 15:15:15 +0100


I am using libiconv 1.11.1 with Microsoft Visual Studio 2005 and I have encountered one problem. Iconv builds fine and works fine until binaries are distributed to machine without development environment. On such machine, binary built to use libiconv will fail to execute, as it can't bind with CRT runtime (MSVCR80.dll). Application will stop with dialogue explaining that MSVCR80.dll could not be found. This happens because OS seeks for executable's manifest file to determine which CRT to use with the executable. In this case, no manifest files are available. When Iconv library is built, manifest files are generated for every output file (EXE and DLL), but these files are left behind (in source folders). They are not installed to output folder. As makefiles are designed for Visual Studio 98 (v6), there are no special options in makefiles regarding manifest files. Linker generates these files by default.

I believe that best option would be to integrate manifests with their appropriate output files (EXE files and DLL files). This makes minimal impact on how Iconv is built (no additional files, installation phase is not affected, build phase is extended with manifest file integration). The result will be that every DLL and EXE will contain embedded manifest (and will run correctly on machine without development environment). Small modification to makefiles is needed to achieve this. I followed recommendations in MSDN to do this. I attached diff files to this message.

In order for these modifications to work correctly, Manifest Tool must be in PATH when library is built. Manifest Tool is a part of Visual Studio 2005 and it is available through PATH when Visual Studio 2005 Command Prompt (vcvarsall.bat) is executed. This is covered by note in README.woe32 which states that vcvarsall.bat should be executed before Iconv build is being made.

I hope this will help others to successfully use Iconv with MSVS 2005.

Milan Gornik

Attachment: libiconv3.patch
Description: Binary data

Attachment: libiconv1.patch
Description: Binary data

Attachment: libiconv2.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]