Skip to content

HelloVADecode , HelloVAEncode, and HelloVAResourceInterop fail to build with included solution file #817

@kevinf28

Description

@kevinf28

D3D12HelloWorld.sln included with the package appears to be missing the lib folder from Microsoft.Direct3D.VideoAccelerationCompatibilityPack.1.0.0 which contains the va.lib and va_win32.lib
error: "LNK2001 unresolved external symbol vaDestroyConfig"

VideoAccelerationCompatibilityPack NuGet package was already installed for the 3 projects.
Simply adding "va.lib;va_win32.lib" to linker "Additional Dependencies" in each of the projects worked.

Not sure if that is the recommended way your team is handling linker flags, otherwise I would create a PR.

Test Setup:

  • VS 2022 Community Edition + Windows 11 "Next" SDK + target v143

Introduced from #810 @sivileri

Activity

sivileri

sivileri commented on Mar 21, 2023

@sivileri
Contributor

Hi! Thanks for pointing this out. Which architecture/flavor are you building? (ie. Debug/Release/x86/x64)
Did VS automatically restored the nuget packages on the first build? Usually that added the necessary project config, but I'd like to repro with the flavor/arch you had the issue with to make sure that case is being covered.

kevinf28

kevinf28 commented on Mar 22, 2023

@kevinf28
Author

I was building Release (X64). I haven't dealt with NuGet project configuration before, I'll give the look around the options from your linked page to see if there was something I overlooked there.

Maybe flushing the cache and re-installing the NuGet will help since this was a new install of VS 2022 + "next" SDK over top of VS 2017 + W11 SV2 SDK I had installed previously.

All the other samples compile, since they don't depend on NuGet.

kevinf28

kevinf28 commented on Mar 24, 2023

@kevinf28
Author

I removed the NuGet packages and get the expected error:
"Error C1083 Cannot open include file: 'va/va.h': No such file or directory "

Re-installing the Nuget to corrects include error, but the linking failure persists. That suggests it is adding the paths correctly but not the linker flags* maybe that is by design. Up to you which libraries to include.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsamplesIssues related to Samples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @kevinf28@walbourn@sivileri

      Issue actions

        HelloVADecode , HelloVAEncode, and HelloVAResourceInterop fail to build with included solution file · Issue #817 · microsoft/DirectX-Graphics-Samples