VC++11 support

Help
Binglong X
2012-08-02
2013-04-26
  • Binglong X
    Binglong X
    2012-08-02

    Matt,

    When do you plan to add VC++11 support to STLSoft (and Pantheios)?

    I tried to compile pantheios-1.0.1-beta213 using VS2012 RC (of course, by simply modifying build\vc10\makefile a little bit). This is what I get:

    C:\pub\code\STLSoft\stlsoft-1.9.114\include\stlsoft/stlsoft.h(652) : fatal error C1189: #error :  Currently only versions 5.0, 6.0, 7.0, 7.1, 8.0, 9.0 and 10.0 of the Visual C++ compiler are supported by the STLSoft libraries

    I feel like STLSoft is too strict on supported compiler versions - If no code has been changed and I just try it with a newer version of compiler, I should have a high possibility of build success, assuming the newer compiler supporting a superset of the older one? For example, can you open up a macro, say, STLSOFT_USE_HIGHEST_SUPPORTED_COMPILER_VERSION such that we can try an unsupported newer compiler version with whatever configuration of the highest version of that compiler supported by STLSoft? You can of course put a disclaimer of at-users-risk for using that macro.

     
  • Sergio Fukaya
    Sergio Fukaya
    2012-12-19

    Hi binglongx

    I'm not sure if you are still interested in this, but I made a few changes myself (I'm assuming that the latest version of the compile has backward compatibility with VC++ 10.0) to be able to compile (at least the libraries) with VC++ 2012 (VC 11.0). I still haven't got the time to test them though (I had never used Pantheios before… this will be my first attempt).

    So try it at your own risk.

    a) Download pantheios-1.0.1-beta214 and stlsoft-1.9.116
    b) Set the environmental variables PANTHEIOS_ROOT and STLSOFT as described by each project documentation.
    c) Edit the stlsoft "include\stlsoft\stlsoft.h" file. Go to line 666, add the lines below and save the file

          # elif (_MSC_VER == 1700)
           define STLSOFT_COMPILER_VERSION_STRING       "Visual C++ 11.0"[/code]
    
            #define _CPPLIB_VER 540[/code]
    
            #define STLSOFT_CF_DINKUMWARE_VC_VERSION_11_0           (0x0b00)[/code]
    
             elif _CPPLIB_VER <= 540
      /* Version 11.0 */
      #   ifdef STLSOFT_COMPILE_VERBOSE
    #    pragma message("  Dinkumware version 11.0")
    #   endif /* STLSOFT_COMPILE_VERBOSE */
    #   define STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION      STLSOFT_CF_DINKUMWARE_VC_VERSION_11_0[/code]
    
               STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION == STLSOFT_CF_DINKUMWARE_VC_VERSION_11_0 || \[/code]
    
            #   elif _MSC_VER == 1700
    #    define PANTHEIOS_IMPL_LINK_COMPILER_NAME           "vc11"[/code]
    
    ..\..\test\unit\test.unit.util.onbailout\test.unit.util.onbailout.cpp(181) : error C2664: 'xtests::c::xtests_startRunner' : cannot convert parameter 1 from 'const pan_char_t [25]' to 'const char *'
            Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 11.0\VC\BIN\cl.EXE"' : return code '0x2'
    Stop.[/code]
    
     
  • Sergio Fukaya
    Sergio Fukaya
    2012-12-19

    Sorry, step (e) was incomplete. You need to add the lines below to the stlsoft "include\stlsoft\util\std\library_discriminator.hpp" around line 341:

    #  elif _CPPLIB_VER <= 540
      /* Version 11.0 */
      #   ifdef STLSOFT_COMPILE_VERBOSE
    #    pragma message("  Dinkumware version 11.0")
    #   endif /* STLSOFT_COMPILE_VERBOSE */
    #   define STLSOFT_CF_STD_LIBRARY_DINKUMWARE_VC_VERSION      STLSOFT_CF_DINKUMWARE_VC_VERSION_11_0[/code]