From: Magnus Jacobsson Date: Tue, 18 Aug 2020 17:51:57 +0000 (+0200) Subject: Use dynamic linking on Windows in test_examples.py X-Git-Tag: 2.46.0~20^2^2~110^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d04f9c65ec60f66a200a674ceab290ba8aef45c6;p=graphviz Use dynamic linking on Windows in test_examples.py --- diff --git a/rtest/test_examples.py b/rtest/test_examples.py index 5fccc5306..83819d8d7 100644 --- a/rtest/test_examples.py +++ b/rtest/test_examples.py @@ -34,8 +34,10 @@ def test_compile_example(src): # ensure the C compiler can build this without error if platform.system() == 'Windows': - subprocess.check_call([cc, filepath, '-nologo', '-link'] - + ['{}.lib'.format(l) for l in libs]) + debug = os.environ.get('configuration') == 'Debug' + rt_lib_option = '-MDd' if debug else '-MD' + subprocess.check_call([cc, filepath, '-Fe:', exe, '-nologo', + rt_lib_option, '-link'] + ['{}.lib'.format(l) for l in libs]) else: subprocess.check_call([cc, '-o', os.devnull, filepath] + ['-l{}'.format(l) for l in libs])