0

I am trying to follow the examples at http://swift.im/swiften/guide/#Example-EchoBot1, for building a simple XMPP client using the swiften library.

Mentioned example needs file Swiften.h. According to the swiften mailing list, this file is generated when building swiften. So, I have tried building it on my windows machine, following the instructions at http://swift.im/git/swift-contrib/tree/Documentation/BuildingOnWindows.txt.

Since they state that Qt and open ssl are optional, I go straight to building by running scons.

This is the output I get:

  c:\swift-2.0>scons
    scons: Reading SConscript files ...
    scons: warning: No installed VCs
    File "C:\swift-2.0\SConstruct", line 1, in <module>
    scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
     File "C:\swift-2.0\SConstruct", line 1, in <module>
    scons: warning: No installed VCs
    File "C:\swift-2.0\SConstruct", line 1, in <module>
    scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
     File "C:\swift-2.0\SConstruct", line 1, in <module>
    KeyError: 'MSVS_VERSION':
      File "C:\swift-2.0\SConstruct", line 1:
        variant_dir = SConscript("BuildTools/SCons/SConscript.boot")
       File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Script\SConscript.py", line 614:
        return method(*args, **kw)
      File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Script\SConscript.py", line 551:
         return _SConscript(self.fs, *files, **subst_kw)
      File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Script\SConscript.py", line 260:
        exec _file_ in call_stack[-1].globals
      File "C:\swift-2.0\BuildTools\SCons\SConscript.boot", line 240:
         if int(env["MSVS_VERSION"].split(".")[0]) < 10 :
      File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Environment.py", line 409:
        return self._dict[key]

How do I set the script to find my version of Visual Studio?

Thanks,

best regards,

c

hansa
  • 139
  • 2
  • 13

2 Answers2

0

SCons should automatically find the installed version of VisualStudio, but you have to open a "VisualC++ command prompt", as described in the BuildingOnWindows.txt, and start the build within this environment.

dirkbaechle
  • 3,984
  • 14
  • 17
  • I have tried this with all three visual studio command prompts I have: "Developer Command Prompt for VS2013", "VS2013 x64 Cross Tools Command Prompt", "VS2013 x86 Native Tools Command Prompt". I get the same problem with each of these. – hansa Aug 31 '14 at 22:12
0

I think we've not updated scons to handle VS 2013 yet. I've got a pending patch to add support for some newer VSs, which I'll try to check includes 2013 and get integrated in the next couple of days.

Kev
  • 2,234
  • 1
  • 12
  • 6
  • Cool. Would you know what is the latest version supported at this time? – hansa Sep 01 '14 at 06:34
  • ISTR that we work with 2012 as long as we're run from the VS command prompt, but I haven't personally tested this. – Kev Sep 01 '14 at 10:12