From 32ab4a5622af0306aea4eaf4d9bfaae71f6ef887 Mon Sep 17 00:00:00 2001 From: Zephyr Pellerin Date: Wed, 13 Feb 2019 12:06:30 -0800 Subject: [PATCH] Include 'Shell32.lib' through pragma rather than linker flag --- setup.py | 9 +++------ src/libethash/mmap_win32.c | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 0560cd36..ab14e485 100755 --- a/setup.py +++ b/setup.py @@ -2,9 +2,8 @@ import os import sys -from setuptools import setup, Extension +from distutils.core import setup, Extension -WIN32 = sys.platform.startswith("win") sources = [ 'src/python/core.c', @@ -34,6 +33,7 @@ 'src/libethash/util.h', ] +WIN32 = sys.platform.startswith("win") ccargs=[ "/Isrc/", @@ -44,13 +44,10 @@ "-Wall" ] -ldargs=["shell32.lib"] if WIN32 else [] - pyethash = Extension('pyethash', sources=sources, depends=depends, - extra_compile_args=ccargs, - extra_link_args=ldargs) + extra_compile_args=ccargs) setup( name='pyethash', diff --git a/src/libethash/mmap_win32.c b/src/libethash/mmap_win32.c index 42968b98..f5cbb333 100644 --- a/src/libethash/mmap_win32.c +++ b/src/libethash/mmap_win32.c @@ -11,6 +11,8 @@ * UnmapViewOfFile: http://msdn.microsoft.com/en-us/library/aa366882(VS.85).aspx */ +#pragma comment(lib, "Shell32.lib") + #include #include #include "mmap.h"