为什么在不使用Debug的情况下运行和直接运行在Visual Studio中有巨大的不同运行时?

时间:2019-03-14 05:51:57

标签: c++ visual-studio vtk

我制作了VolumeView程序

它只是使用OpenCV读取了一些切片图像数据

并在带有VTK的MFC窗口框架中显示3D体积和2d残留图像

   1. Debug x64 Build, and Run from Visual Studio with Debugging

当然,这很慢,因为它是调试模式

   2. Release x64 Build, and Run from Visual Studio without Debugging(ctrl + f5)

这比1.快20倍

   3. Run directly from .exe file (locate at {$ProjectDir}/x64/Release)

我认为2.和3.是相同的方式

但是3. way与2没有相同的运行时。

相反,它需要与1相同的运行时。

  1. 和3.方式不同吗?

我使用

Visual Studio 2017 Pro

VTK8.1v

OpenCV 4.0.0v

c / c ++编译器命令

/Yu"stdafx.h" /GS /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl 
/Fd"x64\Release\vc141.pdb" /Zc:inline /fp:precise /D "_WINDOWS" /D "NDEBUG" 
/D "_UNICODE" /D "UNICODE" /D "_AFXDLL" /errorReport:prompt /WX- 
/Zc:forScope /Gd /Oi /MD /FC /Fa"x64\Release\" /EHsc /nologo 
/Fo"x64\Release\" /Fp"x64\Release\MFCApplication1.pch" /diagnostics:classic 

链接器命令

/OUT:"C:\Users\User1\source\repos\MFCApplication1\x64\Release\MFCApplication1.exe" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"C:\Users\User1\source\repos\MFCApplication1\x64\Release\MFCApplication1.pdb" /DYNAMICBASE "opencv_img_hash400.lib" "opencv_world400.lib" "vtkalglib-8.1.lib" "vtkChartsCore-8.1.lib" "vtkCommonColor-8.1.lib" "vtkCommonComputationalGeometry-8.1.lib" "vtkCommonCore-8.1.lib" "vtkCommonDataModel-8.1.lib" "vtkCommonExecutionModel-8.1.lib" "vtkCommonMath-8.1.lib" "vtkCommonMisc-8.1.lib" "vtkCommonSystem-8.1.lib" "vtkCommonTransforms-8.1.lib" "vtkDICOMParser-8.1.lib" "vtkDomainsChemistry-8.1.lib" "vtkDomainsChemistryOpenGL2-8.1.lib" "vtkexoIIc-8.1.lib" "vtkexpat-8.1.lib" "vtkFiltersAMR-8.1.lib" "vtkFiltersCore-8.1.lib" "vtkFiltersExtraction-8.1.lib" "vtkFiltersFlowPaths-8.1.lib" "vtkFiltersGeneral-8.1.lib" "vtkFiltersGeneric-8.1.lib" "vtkFiltersGeometry-8.1.lib" "vtkFiltersHybrid-8.1.lib" "vtkFiltersHyperTree-8.1.lib" "vtkFiltersImaging-8.1.lib" "vtkFiltersModeling-8.1.lib" "vtkFiltersParallel-8.1.lib" "vtkFiltersParallelImaging-8.1.lib" "vtkFiltersPoints-8.1.lib" "vtkFiltersProgrammable-8.1.lib" "vtkFiltersSelection-8.1.lib" "vtkFiltersSMP-8.1.lib" "vtkFiltersSources-8.1.lib" "vtkFiltersStatistics-8.1.lib" "vtkFiltersTexture-8.1.lib" "vtkFiltersTopology-8.1.lib" "vtkFiltersVerdict-8.1.lib" "vtkfreetype-8.1.lib" "vtkGeovisCore-8.1.lib" "vtkgl2ps-8.1.lib" "vtkglew-8.1.lib" "vtkhdf5-8.1.lib" "vtkhdf5_hl-8.1.lib" "vtkImagingColor-8.1.lib" "vtkImagingCore-8.1.lib" "vtkImagingFourier-8.1.lib" "vtkImagingGeneral-8.1.lib" "vtkImagingHybrid-8.1.lib" "vtkImagingMath-8.1.lib" "vtkImagingMorphological-8.1.lib" "vtkImagingOpenGL2-8.1.lib" "vtkImagingSources-8.1.lib" "vtkImagingStatistics-8.1.lib" "vtkImagingStencil-8.1.lib" "vtkInfovisCore-8.1.lib" "vtkInfovisLayout-8.1.lib" "vtkInteractionImage-8.1.lib" "vtkInteractionStyle-8.1.lib" "vtkInteractionWidgets-8.1.lib" "vtkIOAMR-8.1.lib" "vtkIOCore-8.1.lib" "vtkIOEnSight-8.1.lib" "vtkIOExodus-8.1.lib" "vtkIOExport-8.1.lib" "vtkIOExportOpenGL2-8.1.lib" "vtkIOGeometry-8.1.lib" "vtkIOImage-8.1.lib" "vtkIOImport-8.1.lib" "vtkIOInfovis-8.1.lib" "vtkIOLegacy-8.1.lib" "vtkIOLSDyna-8.1.lib" "vtkIOMINC-8.1.lib" "vtkIOMovie-8.1.lib" "vtkIONetCDF-8.1.lib" "vtkIOParallel-8.1.lib" "vtkIOParallelXML-8.1.lib" "vtkIOPLY-8.1.lib" "vtkIOSQL-8.1.lib" "vtkIOTecplotTable-8.1.lib" "vtkIOVideo-8.1.lib" "vtkIOXML-8.1.lib" "vtkIOXMLParser-8.1.lib" "vtkjpeg-8.1.lib" "vtkjsoncpp-8.1.lib" "vtklibharu-8.1.lib" "vtklibxml2-8.1.lib" "vtkLocalExample-8.1.lib" "vtklz4-8.1.lib" "vtkmetaio-8.1.lib" "vtkNetCDF-8.1.lib" "vtknetcdfcpp-8.1.lib" "vtkoggtheora-8.1.lib" "vtkParallelCore-8.1.lib" "vtkpng-8.1.lib" "vtkproj4-8.1.lib" "vtkRenderingAnnotation-8.1.lib" "vtkRenderingContext2D-8.1.lib" "vtkRenderingContextOpenGL2-8.1.lib" "vtkRenderingCore-8.1.lib" "vtkRenderingFreeType-8.1.lib" "vtkRenderingGL2PSOpenGL2-8.1.lib" "vtkRenderingImage-8.1.lib" "vtkRenderingLabel-8.1.lib" "vtkRenderingLOD-8.1.lib" "vtkRenderingOpenGL2-8.1.lib" "vtkRenderingParallel-8.1.lib" "vtkRenderingVolume-8.1.lib" "vtkRenderingVolumeOpenGL2-8.1.lib" "vtksqlite-8.1.lib" "vtksys-8.1.lib" "vtktiff-8.1.lib" "vtkverdict-8.1.lib" "vtkViewsContext2D-8.1.lib" "vtkViewsCore-8.1.lib" "vtkViewsInfovis-8.1.lib" "vtkzlib-8.1.lib" /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /PGD:"C:\Users\User1\source\repos\MFCApplication1\x64\Release\MFCApplication1.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Release\MFCApplication1.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /DELAYLOAD:"vtkalglib-8.1.dll" /DELAYLOAD:"vtkChartsCore-8.1.dll" /DELAYLOAD:"vtkCommonColor-8.1.dll" /DELAYLOAD:"vtkCommonComputationalGeometry-8.1.dll" /DELAYLOAD:"vtkCommonCore-8.1.dll" /DELAYLOAD:"vtkCommonDataModel-8.1.dll" /DELAYLOAD:"vtkCommonExecutionModel-8.1.dll" /DELAYLOAD:"vtkCommonMath-8.1.dll" /DELAYLOAD:"vtkCommonMisc-8.1.dll" /DELAYLOAD:"vtkCommonSystem-8.1.dll" /DELAYLOAD:"vtkCommonTransforms-8.1.dll" /DELAYLOAD:"vtkDICOMParser-8.1.dll" /DELAYLOAD:"vtkDomainsChemistry-8.1.dll" /DELAYLOAD:"vtkDomainsChemistryOpenGL2-8.1.dll" /DELAYLOAD:"vtkexoIIc-8.1.dll" /DELAYLOAD:"vtkexpat-8.1.dll" /DELAYLOAD:"vtkFiltersAMR-8.1.dll" /DELAYLOAD:"vtkFiltersCore-8.1.dll" /DELAYLOAD:"vtkFiltersExtraction-8.1.dll" /DELAYLOAD:"vtkFiltersFlowPaths-8.1.dll" /DELAYLOAD:"vtkFiltersGeneral-8.1.dll" /DELAYLOAD:"vtkFiltersGeneric-8.1.dll" /DELAYLOAD:"vtkFiltersGeometry-8.1.dll" /DELAYLOAD:"vtkFiltersHybrid-8.1.dll" /DELAYLOAD:"vtkFiltersHyperTree-8.1.dll" /DELAYLOAD:"vtkFiltersImaging-8.1.dll" /DELAYLOAD:"vtkFiltersModeling-8.1.dll" /DELAYLOAD:"vtkFiltersParallel-8.1.dll" /DELAYLOAD:"vtkFiltersParallelImaging-8.1.dll" /DELAYLOAD:"vtkFiltersPoints-8.1.dll" /DELAYLOAD:"vtkFiltersProgrammable-8.1.dll" /DELAYLOAD:"vtkFiltersSelection-8.1.dll" /DELAYLOAD:"vtkFiltersSMP-8.1.dll" /DELAYLOAD:"vtkFiltersSources-8.1.dll" /DELAYLOAD:"vtkFiltersStatistics-8.1.dll" /DELAYLOAD:"vtkFiltersTexture-8.1.dll" /DELAYLOAD:"vtkFiltersTopology-8.1.dll" /DELAYLOAD:"vtkFiltersVerdict-8.1.dll" /DELAYLOAD:"vtkfreetype-8.1.dll" /DELAYLOAD:"vtkGeovisCore-8.1.dll" /DELAYLOAD:"vtkgl2ps-8.1.dll" /DELAYLOAD:"vtkglew-8.1.dll" /DELAYLOAD:"vtkhdf5-8.1.dll" /DELAYLOAD:"vtkhdf5_hl-8.1.dll" /DELAYLOAD:"vtkImagingColor-8.1.dll" /DELAYLOAD:"vtkImagingCore-8.1.dll" /DELAYLOAD:"vtkImagingFourier-8.1.dll" /DELAYLOAD:"vtkImagingGeneral-8.1.dll" /DELAYLOAD:"vtkImagingHybrid-8.1.dll" /DELAYLOAD:"vtkImagingMath-8.1.dll" /DELAYLOAD:"vtkImagingMorphological-8.1.dll" /DELAYLOAD:"vtkImagingOpenGL2-8.1.dll" /DELAYLOAD:"vtkImagingSources-8.1.dll" /DELAYLOAD:"vtkImagingStatistics-8.1.dll" /DELAYLOAD:"vtkImagingStencil-8.1.dll" /DELAYLOAD:"vtkInfovisCore-8.1.dll" /DELAYLOAD:"vtkInfovisLayout-8.1.dll" /DELAYLOAD:"vtkInteractionImage-8.1.dll" /DELAYLOAD:"vtkInteractionStyle-8.1.dll" /DELAYLOAD:"vtkInteractionWidgets-8.1.dll" /DELAYLOAD:"vtkIOAMR-8.1.dll" /DELAYLOAD:"vtkIOCore-8.1.dll" /DELAYLOAD:"vtkIOEnSight-8.1.dll" /DELAYLOAD:"vtkIOExodus-8.1.dll" /DELAYLOAD:"vtkIOExport-8.1.dll" /DELAYLOAD:"vtkIOExportOpenGL2-8.1.dll" /DELAYLOAD:"vtkIOGeometry-8.1.dll" /DELAYLOAD:"vtkIOImage-8.1.dll" /DELAYLOAD:"vtkIOImport-8.1.dll" /DELAYLOAD:"vtkIOInfovis-8.1.dll" /DELAYLOAD:"vtkIOLegacy-8.1.dll" /DELAYLOAD:"vtkIOLSDyna-8.1.dll" /DELAYLOAD:"vtkIOMINC-8.1.dll" /DELAYLOAD:"vtkIOMovie-8.1.dll" /DELAYLOAD:"vtkIONetCDF-8.1.dll" /DELAYLOAD:"vtkIOParallel-8.1.dll" /DELAYLOAD:"vtkIOParallelXML-8.1.dll" /DELAYLOAD:"vtkIOPLY-8.1.dll" /DELAYLOAD:"vtkIOSQL-8.1.dll" /DELAYLOAD:"vtkIOTecplotTable-8.1.dll" /DELAYLOAD:"vtkIOVideo-8.1.dll" /DELAYLOAD:"vtkIOXML-8.1.dll" /DELAYLOAD:"vtkIOXMLParser-8.1.dll" /DELAYLOAD:"vtkjpeg-8.1.dll" /DELAYLOAD:"vtkjsoncpp-8.1.dll" /DELAYLOAD:"vtklibharu-8.1.dll" /DELAYLOAD:"vtklibxml2-8.1.dll" /DELAYLOAD:"vtkLocalExample-8.1.dll" /DELAYLOAD:"vtklz4-8.1.dll" /DELAYLOAD:"vtkmetaio-8.1.dll" /DELAYLOAD:"vtkNetCDF-8.1.dll" /DELAYLOAD:"vtknetcdfcpp-8.1.dll" /DELAYLOAD:"vtkoggtheora-8.1.dll" /DELAYLOAD:"vtkParallelCore-8.1.dll" /DELAYLOAD:"vtkpng-8.1.dll" /DELAYLOAD:"vtkproj4-8.1.dll" /DELAYLOAD:"vtkRenderingAnnotation-8.1.dll" /DELAYLOAD:"vtkRenderingContext2D-8.1.dll" /DELAYLOAD:"vtkRenderingContextOpenGL2-8.1.dll" /DELAYLOAD:"vtkRenderingCore-8.1.dll" /DELAYLOAD:"vtkRenderingFreeType-8.1.dll" /DELAYLOAD:"vtkRenderingGL2PSOpenGL2-8.1.dll" /DELAYLOAD:"vtkRenderingImage-8.1.dll" /DELAYLOAD:"vtkRenderingLabel-8.1.dll" /DELAYLOAD:"vtkRenderingLOD-8.1.dll" /DELAYLOAD:"vtkRenderingOpenGL2-8.1.dll" /DELAYLOAD:"vtkRenderingParallel-8.1.dll" /DELAYLOAD:"vtkRenderingVolume-8.1.dll" /DELAYLOAD:"vtkRenderingVolumeOpenGL2-8.1.dll" /DELAYLOAD:"vtksys-8.1.dll" /DELAYLOAD:"vtktiff-8.1.dll" /DELAYLOAD:"vtkverdict-8.1.dll" /DELAYLOAD:"vtkViewsContext2D-8.1.dll" /DELAYLOAD:"vtkViewsCore-8.1.dll" /DELAYLOAD:"vtkViewsInfovis-8.1.dll" /DELAYLOAD:"vtkzlib-8.1.dll" /TLBID:1

0 个答案:

没有答案