VS 2010

Big Muscle
  • Big Muscle
    Big Muscle

    Anyone was able to use STLPort under VS 2010? It has a lot of mess in setting include directories, so I hope I have set it correctly, but I receive following error when compiling my application with STLPort on include path.

    2>D:\Projekty\STLPort GIT\stlport\stl/_cstdlib.h(158): error C2084: function '__int64 abs(__int64)' already has a body
    2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\../include/stdlib.h(471) : see previous definition of 'abs'

  • Big Muscle
    Big Muscle

    I removed the specified line and it works ok now :)


  • Anonymous

    I've got the same problem and found another (better?) solution.
    In your project-properties you can choose the "Platform Toolset". Per default it is set to v100, which means it compiles against the new msvc10 runtime. Change it to v90 and it compiles against the msvc9 runtime which lets disappear the "error C2084" with abs function.

    regards ;)


  • Anonymous

    Make sure you are opening the Visual Studio Command Prompt (2010) from:

    Start/Programs/Microsoft Visual Studio 2010/Visual Studio Tools
    configure STLPort to run on msvc9

    configure msvc9

    Change _cstdlib.h line 157 to:

    #  elseif (_STLP_MSVC_LIB < 1400)
    cd build\lib
    nmake clean install