MinGW unable to find pkg-config

Recently I need build libewf on Windows, and MinGW is chosen as the compilation tool.

Open MSYS and run autogen.sh in libewf source directory, then following error is appeared

unable to find: pkg-config

 

I read source code of autogen.sh and realized that it’s trying to locate pkg-config at /mingw/bin directory,  Then I checked MinGW installation directory and bin folder, found there is no such pkg-config file. So we need install pkg-config manually.

 

Install pkg-config

At MinGW Wiki page it introduces two methods to install pkg-config, but using a pre-compiled version is much easier. Here is pre-compiled pkg-config download address from SourceForge. After downloading is completed, extract pkg-config.exe and move it to MinGW/bin directory, retry running autogen.sh we will found this problem is solved

Cannot Open File ‘MSCOREE.lib’

When I’m trying to compile the C++/CLI project in Visual Studio 2013, I got an error saying

cannot open file ‘MSCOREE.lib’

This post said MSCOREE.lib is removed from Visual studio 2008, but I’m not sure it’s also working for Visual Studio 2013.

After searching a while, I found this file is located at C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib. Adding this path to Additional Library Directories property value will solve this problem.

Open Project Properties, Linker, General Page and select Additional Library Directories configuration property

Open Project Properties, Linker, General Page and select Additional Library Directories configuration property