Generated a square.pyd file along with corresponding square.lib, square.exp, square.cpp using Cython from a square.pyx and setup.py file. How to use this square.pyd file with Excel VBA?
'''square.pyx
# -*- coding: utf-8 -*-
# distutils: language=c++
def square( unsigned int x):
return (x * x)
'''
'''setup.py
# -*- coding: utf-8 -*-
from setuptools import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("square.pyx", annotate=True))
'''
'''build square.pyd
c:\myDir> python setup.py build_ext --inplace
'''
How do I use square.pyd (Windows DLL) in MS EXCEL as an Object Reference?