I installed a new library in vcpkg, i.e, ITK
and now I am trying to compile a very first code example available in its guide, I installed it via vcpkg so I skipped the installation part(provided in that guide) and immediately created a new cmake project in visual studio.
+ ItkProjects
- ItkProjects
- main.cpp
- CMakeLists.txt #1
- CMakeLists.txt #2
CMakeLists.txt #2
cmake_minimum_required (VERSION 3.8)
project ("ItkProjects")
# Include sub-projects.
add_subdirectory ("ItkProjects")
CMakeLists.txt #1
cmake_minimum_required (VERSION 3.8)
find_package(ITK CONFIG REQUIRED)
include_directories(${ITK_INCLUDE_DIRS})
add_executable (ItkProjects "main.cpp")
target_link_libraries(ItkProjects ${ITK_LIBRARIES})
main.cpp
#include "itkImage.h"
using namespace std;
int main()
{
using ImageType = itk::Image<unsigned char, 3>;
ImageType::Pointer image = ImageType::New();
return EXIT_SUCCESS;
}
CMake configured and generated with no errors but when compiling I end up with this error:
ninja : error : '/lib/double-conversion.lib', needed by 'ItkProjects/ItkProjects.exe', missing and no known rule to make it
I am sure that this file exist in D:\vcpkg\installed\x64-windows\lib
(my installation path) but I am not sure why ninja
can't link to it. Please any help..