There exists a problem when copmpiling the 2DImageFilter
application on a Windows
system.
The problem is that the FreeImage
library is required and should be linked manually to the project from the original FreeImage website. Unlike the Linux
configuration, I have made the setup easier by attaching a submodule of the community's version of FreeImage
and used this to automatically compile and linking FreeImage
into the application.
With multiple attempts, I have been unsuccessful with compiling and linking the library and header files from the community's version of FreeImage
. Therefore, this "fix-around" will get things going!
- Download the original version of
FreeImage
from here. - Extract the downloaded zip-file and head to the
Dist
subdirectory
cd .\Downloads\
cd .\FreeImage3XXXWin32Win64\FreeImage\Dist
- Choose the appropriate system architecture (
x64
orx32
). The following files should be present:
FreeImage.dll
FreeImage.h
FreeImage.lib
- Copy the files to the following directories (create the directories if not present)
FreeImage.dll -> 2DImageFilter\FreeImage\
FreeImage.h -> 2DImageFilter\FreeImage\include
FreeImage.lib -> 2DImageFilter\FreeImage\lib
- Head to the top-level
CMakeLists.txt
inOpenCL-Development\CMakeLists.txt
and turn the option to build the applicationON
# Add option to build 2DImageFilter application
option(BUILD_2D_IMAGE_FILTER "Build the 2DImageFilter application" ON)
- Head to the top-level of the project, delete the
build
cache and re-build withCMake
rm /build -r -force
mkdir build
cd build
cmake ..
cmake --build . --config Debug
If all goes well, the program should compile now!