Skip to content

Commit c9ed19b

Browse files
naveen521kklazka
authored andcommitted
setup.py: add libraries to fix compile of ctypes on MINGW
1 parent a6641c6 commit c9ed19b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1417,11 +1417,12 @@ def detect_ctypes(self):
14171417
include_dirs=include_dirs,
14181418
extra_compile_args=extra_compile_args,
14191419
extra_link_args=extra_link_args,
1420-
libraries=[],
1420+
libraries=(['ole32', 'oleaut32', 'uuid'] if MS_WINDOWS else []),
14211421
sources=sources)
14221422
self.add(ext)
14231423
# function my_sqrt() needs libm for sqrt()
1424-
self.addext(Extension('_ctypes_test', ['_ctypes/_ctypes_test.c']))
1424+
self.addext(Extension('_ctypes_test', ['_ctypes/_ctypes_test.c'],
1425+
libraries=(['oleaut32'] if MS_WINDOWS else [])))
14251426

14261427
ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
14271428
ffi_lib = None

0 commit comments

Comments
 (0)