0

I just look at documentation - scons simple example and it does not work for me.

First file: main.cpp

#include <iostream>

int main()
{
    std::cout << "Hello World" << std::endl;
    return 0;
}

Second file: SCons SConstruct

Program('main.cpp')

Result:

 scons: Reading SConscript files ... 
 scons: done reading SConscript
 files. scons: Building targets ...
 cl /Fomain.obj /c main.cpp /TP /nologo
 "cl" is not an internal or external command, operable program or batch file.
 scons: *** [main.obj] Error 1 scons:
 building terminated because of errors.

I tried this on Window 7 with Visual Studio Express 2012, scons 2.3 Any help?

Brady
  • 10,207
  • 2
  • 20
  • 59
leanid.chaika
  • 2,143
  • 2
  • 27
  • 30

1 Answers1

1

If I create environment myself all works.

env = Environment(ENV = {'PATH' : os.environ['PATH'], \
            'INCLUDE' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include\\;c:\\Program Files (x86)\\Windows Kits\\8.0\\Include\um\\;c:\\Program Files (x86)\\Windows Kits\\8.0\\Include\\shared\\', \
            'LIB' : 'c:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\lib\\;c:\\Program Files (x86)\\Windows Kits\\8.0\\Lib\\win8\\um\\x86\\'})

Also if build from cmd.exe, before call scons call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32", and if building with scons from visual studio NMAKE do it for you.

leanid.chaika
  • 2,143
  • 2
  • 27
  • 30