# All Configurations

Edit the project properties in Visual Studio for "All configurations/x64":

1. Set Advanced > Preferred Build Tool Architecture to "64-bit (x64)".
2. Set Debugging / Working Directory to $(OutDir)

3. In C/C++ / General / Additional Include Directories, use the "Edit..." option to expand the input box, and the "New" button to add each line:

   Copy

       $(OMX_ROOT)\include
       $(OMX_ROOT)\include\rbbt
       $(OMX_ROOT)\include\exports

4. In C/C++ / Preprocessor / Preprocessor Definitions, add the constant NOMINMAX.

5. In C/C++ / Advanced / Disable specific warnings, add 4250.

6. In C/C++ > All Options > Additional Options, add the flag /bigobj.

7. In Linker / General / Additional Library Directories, add the following path:

   Copy

       $(OMX_ROOT)\lib

8. In Linker / Input / Additional Dependencies, add the following:

   Copy

       delayimp.lib
       Cognex.Vision.Core.lib
       Cognex.Rbbt.lib
       rttr_core.lib
       Cognex.Vision.Blob.lib
       Cognex.Vision.CalibFix.lib
       Cognex.Vision.Caliper.lib
       Cognex.Vision.Core.lib
       Cognex.Vision.Display.lib
       Cognex.Vision.ID.lib
       Cognex.Vision.ImageFile.lib
       Cognex.Vision.ImageProcessing.lib
       Cognex.Vision.LineMax.lib
       Cognex.Vision.PixelMap.lib
       Cognex.Vision.PMAlign.lib
       Cognex.Vision.PMRedLine.lib
       ...
       ...
       ...

   Add any additional libraries for each tool you use. For example:

9. In Linker / Input / Delay Loaded DLLs, add the following:

   Copy

       Cognex.Vision.Display.dll
       Cognex.Rbbt.dll
       Cognex.Vision.Blob.dll
       Cognex.Vision.CalibFix.dll
       Cognex.Vision.Caliper.dll
       Cognex.Vision.Core.dll
       Cognex.Vision.ID.dll
       Cognex.Vision.ImageFile.dll
       Cognex.Vision.ImageProcessing.dll
       Cognex.Vision.LineMax.dll
       Cognex.Vision.PixelMap.dll
       Cognex.Vision.PMAlign.dll
       Cognex.Vision.PMRedLine.dll
       CogDisplay.ocx
       cogxrend.dll
       cogxstd.dll
       cvtgdata.dll
       rttr_core.dll

   Add any additional libraries for each tool you use. For example:

10. In Linker / All Options / Generate Manifest, select No

11. In Build Events / Post-Build Event, add the following command lines:

    Copy

        xcopy "$(SolutionDir)deploy\*" "$(OutputPath)" /d /y
        xcopy "$(SolutionDir)images\*" "$(OutputPath)images\" /d /y
        xcopy "$(OMX_ROOT)\bin\CogDisplay.ocx" "$(OutputPath)" /d /y
        xcopy "$(OMX_ROOT)\bin\cogxrend.dll" "$(OutputPath)" /d /y
        xcopy "$(OMX_ROOT)\bin\cogxstd.dll" "$(OutputPath)" /d /y
        xcopy "$(OMX_ROOT)\bin\cvtgdata.dll" "$(OutputPath)" /d /y
        xcopy "$(OMX_ROOT)\bin\*.sxs.manifest" "$(OutputPath)" /d /y
        xcopy "$(OMX_ROOT)\bin\*.runtimeconfig.json" "$(OutputPath)" /d /y