使用SCONS在Cygwin -CL错误下编译C 项目



我试图使用Visual Studio 2010 Express来编译C 项目,通过在Cygwin Shell中运行scons.bat。我在应该运行SCON的文件夹中,但是我遇到了CL错误。这是我的输出:

The Citadel EE@TheCitadelEE-PC /c/JTS/PracticeCode/PingComponent_120
$ /c/Python27/Scripts/scons.bat
scons: Reading SConscript files ...
scons: Building for Windows...
scons: done reading SConscript files.
scons: Building targets ...
cl /FoC:JTSjaustoolset-2.2.1   GUItemplatesCommonBuildInternalEventsInternalEventHandler.obj /c C:JTSjaustoolset-2.2.1GUItemplatesCommonsrcInternalEventsInternalEventHandler.cpp /TP /nologo -DWIN32 -DWINDOWS /MD -EHsc -D_CRT_SE CURE_NO_DEPRECATE -DTIXML_USE_STL /I. /Iinclude /IC:JTSjaustoolset-2.2.1GUItemplatesCommoninclude                                                                        cl is not recognized as an internal or external command,
operable program or batch file.
scons: [C:JTSjaustoolset-2.2.1     GUItemplatesCommonBuildInternalEventsInternalEventHandler.obj] Error 1             
scons: building terminated because of errors.

我尝试在DOS命令提示下运行VCVARSALL.bat来设置环境变量,但这还无法正常工作。

好吧,如果其他人遇到的问题与我相同的问题,这是我为解决问题所做的工作:

我打开了Visual Studio的命令提示符(VS),转到了我的C 文件所在的目录,然后运行scons.bat(我还为scons.bat添加了路径,所以我可以键入scons。蝙蝠'而不是整个路径名)。这会自动设置某些环境变量,因此我可以使用命令行('cl')使用VS构建C 文件。这样做之后,我能够成功地使用SCONS构建我的项目。另外,我没有使用Cygwin,并且我不再使用当前的项目。我发现我可以使用Windows命令提示符。

最新更新