Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build instructions outdated. Please revise to current usage requirements. #323

Open
Noemata opened this issue Jul 10, 2024 · 1 comment
Open

Comments

@Noemata
Copy link

Noemata commented Jul 10, 2024

Please update the build instructions and provided examples. Even after peering into the PowerShell build script and using the example given:

.\BuildFFmpeg.ps1 -Architectures x86,x64,arm64 -AppPlatform uwp -CRT dynamic -Settings "--enable-small"

I get this error:

At X:\samples\FFmpegInterop\BuildFFmpeg.ps1:114 char:58

  • $hostArch = [System.Environment]::Is64BitOperatingSystem ? 'x64' : 'x ...
  •                                                      ~
    

Unexpected token '?' in expression or statement.
At X:\samples\FFmpegInterop\BuildFFmpeg.ps1:139 char:43

  • $spectreLibs = $AppPlatform -eq 'onecore' ? '' : 'spectre'
  •                                       ~
    

Unexpected token '?' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken

@Mansoo
Copy link

Mansoo commented Jul 23, 2024

I had the same problem.
In my case, the powershell I was using was an older 5.x version, and upgrading to version 7 (clean install) solved the problem.

After installation, I used “PowerShell 7 (x64)” in the startup program and compiled without errors.
(The ? syntax that causes the error is said to be supported only by PowerShell 7 or later)

1) Check the version of PowerShell :.
PS C:\blahblah> $PSVersionTable
.....
PSVersion 5.1.22621.3880 <--- your version
PSEdition Desktop
.....

2) Install the new version.

Check for new versions:

  • winget search Microsoft.PowerShell.

Perform the installation:

  • winget install Microsoft.PowerShell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants