- Clone the repo.
- This sln depend on
https://github.com/yunate/dd, so clone it in the same dir. The directory structure is roughly like the following:
your dir
|--- dd
|--- ddimage
| |--- projects
| | |--- ddimage // Output ddimage.lib
| | |--- ddimage_test // Output ddimage_test.exe, there are some demos on how to use ddimage.
ddimagedepends onFreeImageand is managed usingVCPKG, so you need to installVCPKGfirst:
git clone https://github.com/microsoft/vcpkg.git
bootstrap-vcpkg.bat
vcpkg integrate install
- Build
ddfirst(https://github.com/yunate/dd). - Open the
ddimage.slnwith Visual studio, and build it yourself. - Add head file dir:
dd\projects; ddimage\projects, and add the head file in your code#include "ddimage/ddimage.h" - Add the library dir:
dd\bin\$(Configuration)_$(PlatForm)\; ddimage\bin\$(Configuration)_$(PlatForm)\, and add the needed libddbase.lib; ddimage.lib. - This project depends on FreeImage. Refer to
projects\ddimage_test\vcpkg.jsonvcpkg-configuration.jsonfiles for configuring your FreeImage dependency, you can just copy those file to your own project dir, and configure VS with UseVcpkg set to true. - You can refer to the demo in the test project for usage.
- Due to the project's use of the STL library in its exported items, it is not recommended to directly send the header files and compiled lib/dll files to others for use. Instead, it is advised to compile and use them locally on your own machine.