Skip to content

Example build fail on windows (LNK2019 unresolved external symbol) #75

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

Closed
niuhuan opened this issue Nov 9, 2022 · 2 comments
Closed

Comments

@niuhuan
Copy link

niuhuan commented Nov 9, 2022

I had vcpkg install ffmpeg --triplet=x64-windows-static-md

but building faild

[dependencies]
rusty_ffmpeg = "0.10.0" 

main.rs same as example

D:\\Developments\\Runtimes\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
  = note: avformat.lib(tls_schannel.o) : error LNK2019: ????????? AcquireCredentialsHandleA,?? tls_open ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? __imp_FreeCredentialsHandle,?? tls_close ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? InitializeSecurityContextA,?? tls_close ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? __imp_DeleteSecurityContext,?? tls_close ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? __imp_ApplyControlToken,?? tls_close ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? QueryContextAttributesA,?? tls_write ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? FreeContextBuffer,?? tls_close ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? EncryptMessage,?? tls_write ???????
          avformat.lib(tls_schannel.o) : error LNK2019: ????????? DecryptMessage,?? tls_read ???????
          avcodec.lib(mfenc.o) : error LNK2019: ????????? MFCreateMediaType,?? mf_choose_output_type ???????
          avcodec.lib(mfenc.o) : error LNK2001: ????????? IID_ICodecAPI
          avcodec.lib(mfenc.o) : error LNK2001: ????????? IID_IMFMediaEventGenerator
          avcodec.lib(mf_utils.o) : error LNK2019: ????????? __imp_CoUninitialize,?? ff_free_mf ???????
          avcodec.lib(mf_utils.o) : error LNK2019: ????????? __imp_CoInitializeEx,?? ff_instantiate_mf ???????
          avcodec.lib(mf_utils.o) : error LNK2019: ????????? __imp_CoTaskMemFree,?? ff_instantiate_mf ???????
          avcodec.lib(dxva2.o) : error LNK2001: ????????? __imp_CoTaskMemFree
          avcodec.lib(mf_utils.o) : error LNK2019: ????????? MFStartup,?? ff_instantiate_mf ???????
          avcodec.lib(mf_utils.o) : error LNK2019: ????????? MFShutdown,?? ff_free_mf ???????
          avcodec.lib(mf_utils.o) : error LNK2019: ????????? MFCreateAlignedMemoryBuffer,?? ff_create_memory_sample ???????
          avcodec.lib(mf_utils.o) : error LNK2019: ????????? MFCreateSample,?? ff_create_memory_sample ???????
          avcodec.lib(mf_utils.o) : error LNK2001: ????????? IID_IMFTransform
          avutil.lib(hwcontext_dxva2.o) : error LNK2019: ????????? __imp_GetDesktopWindow,?? dxva2_device_create ???????
          D:\Developments\Projects\study-rust\target\debug\deps\study_rust.exe : fatal error LNK1120: 21 ??????????
@ldm0
Copy link
Member

ldm0 commented Nov 9, 2022

Please try this workaround: #37 (comment). Not all system dependencies are automatically linked by vcpkg currently.

@niuhuan
Copy link
Author

niuhuan commented Nov 9, 2022

Thanks, it's work

@ldm0 ldm0 closed this as completed Nov 10, 2022
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