Skip to content

编译的时候如何以release的方式编译? #30

@Leowolf93

Description

@Leowolf93

我尝试修改了Build和install脚本
`function BuildSDK([string]$arg0, [string]$arg1, [string]$arg2) {
Remove-Item sdk_build -Force -Recurse -ErrorAction SilentlyContinue
New-Item sdk_build -ItemType Directory | Out-Null
cmake -G $arg2 -A Win32 -B sdk_build $arg0 $arg1
Write-Host 'Building sdk' -ForegroundColor Yellow
cmake --build sdk_build --config Release
}

function InstallSDK {
if (-Not(Test-Path -Path sdk_build)) {
Write-Host 'Project has not been built, run ".\build.ps1 build" first' -ForegroundColor Yellow
return
}
Write-Host 'Installing sdk, require Administrator privilege' -ForegroundColor Yellow
cmake --build sdk_build --target install --config Release
}
`
但是这样编译出来的添加到程序中,主程序直接不能运行(在vs的release模式可以运行,但是单独把exe拿出来,用windeployqt打包后就不行)。
请大神指点一二,谢谢!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions