c++ - Running HelloWorld example of itk in Visual Studio 2013 -
I installed it using the answer on my system.
Therefore, I have bin, included, Lib, share all the folders in C, Program Files (x86) \ ITK.
(Small question: bin subfolder is just "ItkTestDriver.exe" file?)
Now, I'm trying to run the HelloWorld example. I have created a project that includes HelloWorld.cpp.
#include "stdafx.h" #include "itkImage.h" #include & lt; Iostream & gt; Int main () {typedef itk :: image & lt; Unsigned cum, 3 & gt; image type; Image Type :: Pointer Image = Image Type: New (); Std :: cout & lt; & Lt; "ITK Hello World!" & Lt; & Lt; Std :: endl; Std :: CIN; Return 0; }
I have never used external libraries, so I searched the Internet and I followed the following:
- Projects-> Properties- > Linker-> Input-> Additional dependencies: kernel32.lib; User32.lib; Gdi32.lib; Winspool.lib; Comdlg32.lib; Advapi32.lib; Shell32.lib; Ole32.lib; Oleaut32.lib; Uuid.lib; Odbc32.lib; Odbccp32.lib; C: \ Program Files (x86) \ ITK \ lib \ ITKCommon-4.6.lib;% (additional dependencies)
- Project-> Properties-> Linker-> General-> Additional Library Directories: C: \ Include in Program Files (x86) \ ITK \ << li>
However, I still have problems and I do not build my program due to a serious error not finding the header file I can
I copy all the header files in ITK \ in the directory of my project Have tried to create the script, but I have the same error for the other files.
I would be grateful if a person has helped me with this problem to help me.
UPDATE:
I followed the following:
-
Project-> Properties -> Linker-> Input-> Additional dependency: I added C: \ program files (x86) \ ITK \ lib * .lib;
-
Project-> Properties-> C / C ++ -> Extra Directory Include: I C: \ Program Files (x86) \ ITK \ include \ ITK-4.6;
Added, I was getting this error:
Error 1 error C4996: 'std :: _ copy_impl': unsafe Function call with parameter - It depends on the call caller to disable the warning that the nearby values are correct, use the -D_SCL_SECURE_NO_WARNINGS to view C ++ 'Checked Iterators' See the documentation about using I: \ microsoft visual studio 12.0 \ vc \ include \ xutility 2132 1 console application 1
I have decided to disable this warning:
- Disable "Projects-> Properties-> C / C ++ -> Advanced -> Specific Alerts ->" I " 4996 "added.
Comments
Post a Comment