Archived

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

Compiling Ice with VS2005 Beta 2

Hello, everyone,

It looks like Ice 2.1.0 can be compiled with Visual Studio 2005 Beta 2.

Here is what I had to do to get around different compile and link errors:

1) "Treat warnings as errors" options had to be turned off for many projects. Many standard C library functions cause deprecation warnings.

2) For template classes, copy constructor declaration which takes the same exact const object reference does not require nonstandard syntax anymore. So, preprocessor condition in all blocks that look like this:
#if defined(_WIN32) // COMPILERBUG: Is VC++ or GNU C++ right here???
template<>
Handle(const Handle<T>& r)
#else
Handle(const Handle& r)
#endif

becomes a little bit more complicated: #if defined(_WIN32) && ((defined(_MSC_VER) && (_MSC_VER < 1400)) || !defined(_MSC_VER))

3) Identifiers __out and __in are declared in <sal.h>, so many samples fail to compile. I went and changed code generation to produce __ice_out and __ice_in variable names instead.

4) It is probably Beta 2 specific, but after the conversion of the MSVC workspace to VS2005 solution all DLL projects were set up to use embedded manifests. I had to disable manifest embedding for all DLL projects in the Ice solution and made sure that manifest embedding was turned on for EXE projects.

5) "Treat wchar_t as built-in type" was set to "Yes" in iceutil after conversion. I had to set it (back?) to "No".

It took me several clean rebuilds to get things to compile. I tried glacier2 chat server and throughput sample and they worked.

C# compilation was less troublesome and pretty self-explanatory. Links to snk files are now specified in project settings instead of assembly attributes and a couple of .NET runtime calls were renamed.

Just thought it might be helpful to someone.

~Zmitrok

Comments

  • Hi Zmitrok,

    thanks muchly for the info -- I'm sure that other people will appreciate it too!

    Cheers,

    Michi.