Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit e25aebf

Browse files
committed
Include 'Shell32.lib' through pragma rather than linker flag
1 parent 3ee7bcf commit e25aebf

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

setup.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
import os
33
import sys
44

5-
from setuptools import setup, Extension
6-
7-
WIN32 = sys.platform.startswith("win")
8-
5+
from distutils.core import setup, Extension
96
sources = [
107
'src/python/core.c',
118
'src/libethash/io.c',
@@ -34,6 +31,7 @@
3431
'src/libethash/util.h',
3532
]
3633

34+
WIN32 = sys.platform.startswith("win")
3735

3836
ccargs=[
3937
"/Isrc/",
@@ -44,13 +42,10 @@
4442
"-Wall"
4543
]
4644

47-
ldargs=["shell32.lib"] if WIN32 else []
48-
4945
pyethash = Extension('pyethash',
5046
sources=sources,
5147
depends=depends,
52-
extra_compile_args=ccargs,
53-
extra_link_args=ldargs)
48+
extra_compile_args=ccargs)
5449

5550
setup(
5651
name='pyethash',

src/libethash/mmap_win32.c

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* UnmapViewOfFile: http://msdn.microsoft.com/en-us/library/aa366882(VS.85).aspx
1212
*/
1313

14+
#pragma comment(lib, "Shell32.lib")
15+
1416
#include <io.h>
1517
#include <windows.h>
1618
#include "mmap.h"

0 commit comments

Comments
 (0)