Vcpkg: building against apr-util:x64-windows, libexpat.dll is not found when running the program

Created on 17 Sep 2020  路  2Comments  路  Source: microsoft/vcpkg

Describe the bug
When building against apr-util:x64-windows, the executable is linked to libexpat.dll which is not found when running the program.
I can see that libaprutil-1.dll is copied to Debug. However libexpat.dll is missing.

Environment

  • OS: Win10
  • Compiler: MSVC 19.27.29111.0

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install apr-util:x64-windows
  2. Use apr-util in cmake build using the following snipped.
# apr-util
find_path(APR_UTIL_INCLUDE_DIR apr_queue.h)
if (WIN32)
  find_library(APR_UTIL_LIBRARY libaprutil-1)
  message("Found apr util -> " ${APR_UTIL_LIBRARY})
endif(WIN32)
if (UNIX)
  find_library(APR_UTIL_LIBRARY aprutil-1)
endif(UNIX)
include_directories(${APR_UTIL_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} PUBLIC ${APR_UTIL_LIBRARY})
  1. build
  2. Run program, get an error saying "libexpat.dll" is missing.

Expected behavior
Expected the program to run

Failure logs
None

Additional context
The same build and run works on macos and linux.

port-bug

All 2 comments

Hi @abhishekmishra
Thanks for posting this issue.

Could you please try to build this based on PR #13663 submitted by @janholt ?

Thanks.

Hi @abhishekmishra
Thanks for posting this issue.

Could you please try to build this based on PR #13663 submitted by @janholt ?

Thanks.

Apologies for not responding earlier. However I pulled master now (since it looks like the changes are merged), and this works for me. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

invy picture invy  路  3Comments

oahzuw picture oahzuw  路  3Comments

pkeir picture pkeir  路  3Comments

F0I0l0I0P picture F0I0l0I0P  路  3Comments

cjvaijo picture cjvaijo  路  3Comments