windows下scons的问题
我尝试使用 scons 为 python 脚本构建一个可执行文件,但失败并出现以下跟踪:
C:\WORKAREA\study>C:\Python26\Scripts\scons
scons: Reading SConscript files ...
scons: warning: No installed VCs
File "C:\WORKAREA\study\SConstruct", line 1, in <module>
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\WORKAREA\study\SConstruct", line 1, in <module>
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /OUT:fibo.exe fibo.py
'link' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [fibo.exe] Error 1
scons: building terminated because of errors.
似乎 link /nologo /OUT 是一切崩溃的点。谁能帮我解决这个问题吗?
I tried to build an executable for a python script using scons, which is failing with the following trace:
C:\WORKAREA\study>C:\Python26\Scripts\scons
scons: Reading SConscript files ...
scons: warning: No installed VCs
File "C:\WORKAREA\study\SConstruct", line 1, in <module>
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\WORKAREA\study\SConstruct", line 1, in <module>
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /OUT:fibo.exe fibo.py
'link' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [fibo.exe] Error 1
scons: building terminated because of errors.
It seems that link /nologo /OUT is the point where everything breaks down. Can anyone help me with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在尝试从 .py 文件构建 .exe 文件,对吗?在这种情况下,您不需要 VC++ 编译器,您将需要像 py2exe 这样的工具。如果您想使用 SCons 作为构建系统,则需要为 py2exe.exe 创建 SCons 构建器。大致如下:
http://www.py2exe.org/
You're trying to build a .exe file from a .py file right? In that case, you don't need the VC++ compiler, you will need a tool like py2exe. And if you want to use SCons as a build system, you will need to create a SCons builder for py2exe.exe. Something along the lines as:
http://www.py2exe.org/