QT+VS创建OCC项目-创新互联

为了方便项目的移植,项目的设置最好采用vs的bat进行打开

盐田ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联建站的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18980820575(备注:SSL证书合作)期待与您的合作!

1、env.bat

OCC_PATH为自己的OCC的路径

env.bat

@echo off
 
set "OCC_PATH=D:\Program Files (x86)\OpenCASCADE-7.3.0-vc14-64\opencascade-7.3.0"
 
call "%OCC_PATH%\env.bat" %1 %2 %3
 
call "custom.bat" %1 %2 %3
 
set "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
set "CSF_ResourcesDefaults=%RES_DIR%"
set "CSF_TutorialResourcesDefaults=%RES_DIR%"
 
set "PATH=%QTDIR%/bin;%PATH%"

msvc.bat

其中dp0后面的OCCQT为当前项目的名称

msvc.bat

@echo off
 
Setlocal EnableDelayedExpansion
 
rem Setup environment
call "%~dp0env.bat" %1 %2 %3
 
rem Define path to project file
set "PRJFILE=%~dp0OCCQT.sln"
 
rem Launch Visual Studio - either professional (devenv) or Express, as available
if exist "%DevEnvDir%\devenv.exe"  (
  start "" "%DevEnvDir%\devenv.exe" "%PRJFILE%"
) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe"  (
  start "" "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
) else (
  echo Error: Could not find MS Visual Studio ^(%VCVER%^)
  echo Check relevant environment variable ^(e.g. VS100COMNTOOLS for vc10^)
)

OCC_PropertySheet.props,属性管理器,添加这个后方便于以后相关项目的添加,里面添加的关于occ的设置

OCC_PropertySheet.props

$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories)$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories)TKBin.lib;TKBinL.lib;TKBinTObj.lib;TKBinXCAF.lib;TKBO.lib;TKBool.lib;TKBRep.lib;TKCAF.lib;TKCDF.lib;TKD3DHost.lib;TKDCAF.lib;TKDFBrowser.lib;TKDraw.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKIGES.lib;TKIVtk.lib;TKIVtkDraw.lib;TKLCAF.lib;TKMath.lib;TKMesh.lib;TKMeshVS.lib;TKOffset.lib;TKOpenGl.lib;TKPrim.lib;TKQADraw.lib;TKService.lib;TKShapeView.lib;TKShHealing.lib;TKStd.lib;TKStdL.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKSTL.lib;TKTInspector.lib;TKTInspectorAPI.lib;TKTObj.lib;TKTObjDRAW.lib;TKToolsDraw.lib;TKTopAlgo.lib;TKTopTest.lib;TKTreeModel.lib;TKV3d.lib;TKVCAF.lib;TKView.lib;TKViewerTest.lib;TKVInspector.lib;TKVRML.lib;TKXCAF.lib;TKXDEDRAW.lib;TKXDEIGES.lib;TKXDESTEP.lib;TKXMesh.lib;TKXml.lib;TKXmlL.lib;TKXmlTObj.lib;TKXmlXCAF.lib;TKXSBase.lib;TKXSDRAW.lib;%(AdditionalDependencies)

其中依赖的lib可以在相应的occ的lib目录下,如(D:\Program Files (x86)\OpenCASCADE-7.3.0-vc14-64\opencascade-7.3.0\win64\vc14\lib),

通过一个命令dir /B >lib.txt生成

lib.bat

dir /B >lib.txt

本文福利,莬费领取Qt开发学习资料包、技术视频,内容包括(C++语言基础,Qt编程入门,QT信号与槽机制,QT界面开发-图像绘制,QT网络,QT数据库编程,QT项目实战,QT嵌入式开发,Quick模块等等)↓↓↓↓↓↓见下面↓↓文章底部点击莬费领取↓↓

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


标题名称:QT+VS创建OCC项目-创新互联
本文URL:http://azwzsj.com/article/dopsid.html