Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINK : error LNK2001: unresolved external symbol initfisher/cfisher #5

Open
fmyzjs opened this issue Aug 12, 2014 · 5 comments
Open

Comments

@fmyzjs
Copy link

fmyzjs commented Aug 12, 2014

I am doing a project in python where I have a very large dataset where I have to do a fisher exact test. This must be done 600,000,000 times so efficiency is quite important. However, with the scipy package this takes 50 hours, but I have read that https://pypi.python.org/pypi/fisher/ should be much faster. But I don't understand how to get it installed in Windows 8.

I have tried using easy_install below:

running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\fisher
copying fisher\__init__.py -> build\lib.win32-2.7\fisher
running build_ext
building 'fisher/cfisher' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\lib\site-packages\numpy\core\include -Ic:\Python27\include -Ic:\Python27\PC /Tcsrc/cfisher.c /Fobuild\temp.win32-2.7\Release\src/cfisher.obj
cfisher.c
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\Python27\libs /LIBPATH:c:\Python27\PCbuild /EXPORT:initfisher/cfisher build\temp.win32-2.7\Release\src/cfisher.obj /OUT:build\lib.win32-2.7\fisher\cfisher.pyd /IMPLIB:build\temp.win32-2.7\Release\src\cfisher.lib /MANIFESTFILE:build\temp.win32-2.7\Release\src\cfisher.pyd.manifest
LINK : error LNK2001: unresolved external symbol initfisher/cfisher
build\temp.win32-2.7\Release\src\cfisher.lib : fatal error LNK1120: 1 unresolved externals
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1120
@brentp
Copy link
Owner

brentp commented Aug 12, 2014

I dont have any experience with building python C extensions on windows. Do you have math.h and numpy stuff where your compiler knows where to find them? Are you able to build other extension modules?

@fmyzjs
Copy link
Author

fmyzjs commented Aug 13, 2014

Thank you very much for your timely reply.I have the env all i need,and i can build other extension modules

@CFretter
Copy link

CFretter commented May 6, 2015

Same problem here

Downloading https://pypi.python.org/packages/source/f/fisher/fisher-0.1.4.tar.gz#md5=bfc763b7333a1f428e4c447dd8a85968
Processing fisher-0.1.4.tar.gz
Writing c:\users\cfretter\appdata\local\temp\easy_install-2rcky6\fisher-0.1.4\setup.cfg
Running fisher-0.1.4\setup.py -q bdist_egg --dist-dir c:\users\cfretter\appdata\local\temp\easy_install-2rcky6\fisher-0.1.4\egg-di
st-tmp-3vovbe
cfisher.c
c:\anaconda\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, dis
able it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
src/cfisher.c(513) : warning C4244: 'function' : conversion from 'Py_ssize_t' to 'long', possible loss of data
src/cfisher.c(533) : warning C4244: 'function' : conversion from 'Py_ssize_t' to 'long', possible loss of data
src/cfisher.c(555) : warning C4244: 'function' : conversion from 'Py_ssize_t' to 'long', possible loss of data
src/cfisher.c(1457) : warning C4244: '=' : conversion from 'npy_intp' to 'int', possible loss of data
src/cfisher.c(1622) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1624) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1626) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1628) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1643) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1654) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1665) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(4739) : warning C4244: 'function' : conversion from '__int64' to 'long', possible loss of data
src/cfisher.c(6225) : warning C4267: '=' : conversion from 'size_t' to 'char', possible loss of data
src/cfisher.c(6236) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
LINK : error LNK2001: unresolved external symbol initfisher/cfisher
build\temp.win-amd64-2.7\Release\src\cfisher.lib : fatal error LNK1120: 1 unresolved externals
error: Setup script exited with error: command 'C:\\Users\\cfretter\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for P
ython\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1120

@brentp
Copy link
Owner

brentp commented May 6, 2015

@CFretter unfortunately, I'm not familiar with windows so I can help you. Hopefully someone else who has resolved this type of thing can chime in.

@DNeems-zz
Copy link

I am having the same issue. Was anyone able to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants