python里面weave嵌入c语言的问题

http://blog.csdn.net/rumswell/article/details/6563078
我用自己的跑了一下这个贴子的代码发现报错 并且提示是
Looking for python27.dll
Building msvcr library: "C:\Python27\libs\libmsvcr90.a" (from C:\Windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_750b37ff97f4f68b\msvcr90.dll)
objdump.exe: C:\Windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_750b37ff97f4f68b\msvcr90.dll: File format not recognized
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\IPython\core\interactiveshell.py", line 3035, in run_code

exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in
x=test()
File "", line 10, in test
inline(code, ["x"],type_converters=converters.blitz,compiler = 'gcc')
File "C:\Python27\lib\site-packages\scipy\weave\inline_tools.py", line 366, in inline
**kw)
File "C:\Python27\lib\site-packages\scipy\weave\inline_tools.py", line 496, in compile_function
verbose=verbose, **kw)
File "C:\Python27\lib\site-packages\scipy\weave\ext_tools.py", line 373, in compile
verbose=verbose, **kw)
File "C:\Python27\lib\site-packages\scipy\weave\build_tools.py", line 242, in build_extension
compiler_dir = platform_info.get_compiler_dir(compiler_name)
File "C:\Python27\lib\site-packages\scipy\weave\platform_info.py", line 120, in get_compiler_dir
compiler_obj = create_compiler_instance(dist)
File "C:\Python27\lib\site-packages\scipy\weave\platform_info.py", line 57, in create_compiler_instance
compiler = new_compiler(compiler=compiler_name)
File "C:\Python27\lib\site-packages\numpy\distutils\ccompiler.py", line 562, in new_compiler
compiler = klass(None, dry_run, force)
File "C:\Python27\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 94, in init
msvcr_success = build_msvcr_library()
File "C:\Python27\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 361, in build_msvcr_library
generate_def(dll_file, def_file)
File "C:\Python27\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 278, in generate_def
raise ValueError("Symbol table not found")
ValueError: Symbol table not found

1个回答

有没有安装vc运行时环境

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问