This forum has been archived. Please start a new discussion on GitHub.

compile 3.6.1-demos in visual studio 2015

I compile chat demo with vs2015.There are some errors like this:
3> PollingChat.cpp
1> Client.cpp
3>e:\ice-demos-3.6\cpp\chat\server\generated\pollingchat.h(1331): error C2248: “PollingChat::ChatRoomEvent::__vbaseDtor”: 无法访问 protected 成员(在“PollingChat::ChatRoomEvent”类中声明)
3> e:\ice-demos-3.6\cpp\chat\server\generated\pollingchat.h(1319): note: 编译器已在此处生成“PollingChat::ChatRoomEvent::__vbaseDtor”
3> e:\ice-demos-3.6\cpp\chat\server\generated\pollingchat.h(1278): note: 参见“PollingChat::ChatRoomEvent”的声明

But it works well with vs2012.
Plase help me how to solve this problem.


  • xdm
    xdm La Coruña, Spain
    To build with Visual Studio 2015 you need to update the project to use v140 runtime. If you decline the update when you're first prompted, you can update the project later by choosing Update VC++ project on the Project menu.
  • I chose yes when i first open the project. so I have updated the project to use v140 runtime. But the problem existed also.Attachment not found.
    ??.PNG 33.2K
  • I compile this project with vs2013 success.
  • xdm
    xdm La Coruña, Spain

    I just try again with Visual Studio 2015 and ice-demos 3.6 branch and things are building fine. Are you build ice-demos from the 3.6 branch? What is the exact version of your Visual Studio 2015?
  • It works fine if I do not update the project to use v140 runtime. The project name was apended with Visual Studio 2012.

    Attachment not found.

    Attachment not found.

    Attachment not found.
  • xdm
    xdm La Coruña, Spain
    I'm able to reproduce the issue after upgrade to visual studio 2015 update 1, It seems a compiler bug:
    class ICE_API Metrics : virtual public ::Ice::Object
        virtual ~Metrics() {}
        friend class Metrics__staticInit;
    class Metrics__staticInit
        ::IceMX::Metrics _init;
    static Metrics__staticInit _Metrics_init;

    It doesn't like code like this because the destructor is protected but it should be fine as Metrics__staticInit is a friend of the Metrics class.
  • Thank you very much !
    You mean it is a compliler bug, the ice code is right.But the problem is to be resolved by ZeroC or Microsoft?
    Is it will write to ice document that do not using visual studio 2015 update 1?
  • bernard
    bernard Jupiter, FL
    It's a C++ compiler bug that was unfortunately introduced in VS2015 Update 1.

    We hope Microsoft will fix this bug soon. Unless Microsoft fixes this bug very quickly, we will prepare and publish a patched version of Ice 3.6.1 with a work around. In the meantime, we recommend to stay with the original un-updated VS2015 release.

    All the best,
  • xdm
    xdm La Coruña, Spain
    Hi zhang,

    We have updated our Windows installers to include a workaround for this Visual Studio 2015 bug, you can download it from our download page.

    Best Regards,
  • Hi xdm,
    It works fine now.
    I can not download the install package from your download page.But there is only source in github.
    Many thanks.
  • xdm
    xdm La Coruña, Spain
    Hi Zhang,

    I'm glad things are working fine for you, did you have any issue with the download page?