0

I am using MSYS2 UCRT environment to compile a test a C/C++ program and need to link with a third-party library installed on Windows.

installpath = '/c/Program\ Files\ \(x86\)/Foo/Tester'

libpath = installpath + '/bin'

incpath = installpath + '/include/tester/x64'

libfiles = 'msdia140.dll', 'symsrv.dll', 'TesterCore.lib', 'TesterCore.dll'

incfiles = 'tester.h'

How do I define a dependency for this library to compile and link with my test executable?

1 Answer 1

0

With compiler.find_library() you can pass your installpath variable to search for the proper header and libraries. The returned object is a dep, which you can use in dependencies argument of executable. Also you can try Meson: how to make find_library() works with an unusual path? answer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.