Archived
This forum has been archived. Please start a new discussion on GitHub.
compile 3.6.1-demos in visual studio 2015
fengshengheli
in Bug Reports
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.
Thanks!
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.
Thanks!
0
Comments
-
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.0
-
Hi,
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?0 -
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.0 -
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 { public: .... protected: virtual ~Metrics() {} friend class Metrics__staticInit; }; class Metrics__staticInit { public: ::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.1 -
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,
Bernard0 -
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,
José0
