Problems with compiling C code in Python

后端 未结 3 378
萌比男神i
萌比男神i 2021-01-25 14:27

I use Anaconda for Python 2.7.10 in Windows 7, 64 bit. I also use Visual Studio 2010. I installed Microsoft Visual Studio for Python.

When I try to compile a C code in

3条回答
  •  情歌与酒
    2021-01-25 15:14

    And if I only comment

    libraries=['m']
    

    and use

    ext_modules = [Extension("utilFunctions_C",sourcefiles, include_dirs=py_inc + np_inc)]    
    

    then I get lots of warning (not errors hopefully) whose final part is:

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\link.exe /DLL / nologo /INCREMENTAL:NO /LIBPATH:C:\Anaconda\libs /LIBPATH:C:\Anaconda\PCbuild\am d64 /EXPORT:initutilFunctions_C build\temp.win-amd64-2.7\Release\utilFunctions.o bj build\temp.win-amd64-2.7\Release\cutilFunctions.obj /OUT:C:\Anaconda\sms-tool s-master\software\models\utilFunctions_C\utilFunctions_C.pyd /IMPLIB:build\temp. win-amd64-2.7\Release\utilFunctions_C.lib /MANIFESTFILE:build\temp.win-amd64-2.7 \Release\utilFunctions_C.pyd.manifest cutilFunctions.obj : warning LNK4197: export 'initutilFunctions_C' specified mul tiple times; using first specification Creating library build\temp.win-amd64-2.7\Release\utilFunctions_C.lib and obj ect build\temp.win-amd64-2.7\Release\utilFunctions_C.exp

    I think the problem is now resolved. Thank you LPs!!

提交回复
热议问题