Results 1 to 8 of 8

Thread: Vc++ 8.0

  1. #1
    thelONE is offline Registered User
    Join Date
    Oct 2005
    Posts
    9

    Vc++ 8.0

    IDE:Visual C++ 8.0
    version:2.1.2
    Symptom: Compile Error(C2299) in handle.h

    handle.h
    Code:
    #ifdef _WIN32 // COMPILERBUG: Is VC++ or GNU C++ right here???
        template<>
        Handle(const Handle<T>& r)   // C2299
    #else
        Handle(const Handle& r)
    #endif
        {
    	this->_ptr = r._ptr;
    
    	if(this->_ptr)
    	{
    	    this->_ptr->__incRef();
        }
    error C2299: 'IceUtil::Handle<T>::Handle' :
    behavior change: an explicit specialization cannot be a copy constructor or copy assignment operator
    d:\program files\开发环境\ice2.1.2\include\iceutil\handle.h 141

    some information I found in MSDN:
    "This error can also be generated as a result of compiler conformance work that was done for Visual C++ 2005: previous versions of Visual C++ allowed explicit specializations for a copy constructor or a copy assignment operator.

    To resolve C2299, do not make the copy constructor or assignment operator a template function, but rather a non-template function that takes a class type. Any code that calls the copy constructor or assignment operator by explicitly specifying the template arguments needs to remove the template arguments."

    And more:
    "Breaking Changes in the Visual C++ 2005 Compiler
    Explicit specialization not allowed as a copy constructor/copy assignment operator
    Code that depends on an explicit template specialization for a copy constructor or copy assignment operator will now get Compiler Error C2299. Standard C++ prohibits this. This change was made for conformance reasons, to make code more portable.
    "
    Li Delong
    Student, Beijing Jiaotong University.
    Currently working on a experimental online game project.

  2. #2
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    Note that Visual C++ 8 is not a supported compiler for Ice 2.1.2.

    If you download Ice 3.0, you will find that this problem has been rectified.

    Cheers,

    Michi.

  3. #3
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181
    hi, michi,
    I have tried the 3.0 in vc8.0 and the source codes can be compiled well but the link configuration is not set correctly and brings many errors. Actually, it seems due to the visual studio project conversion problem when I built the downloaded source codes without any modifications. In vc7.1, everything is OK.
    Hope a vc-8.0 compatible version will soon be provided in download page.

    Thanks for your excellent Ice ,which makes many things cool.




    Best Regards
    OrNot
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

  4. #4
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    I did a clean build of Ice for C++ with Visual Studio 8 before we shipped Ice 3.0. The trick to get the conversion done without errors is as follows:

    Unpack the source distribution and build it with Visual Studio 7. (This is really just to get all the Slice files processed by slice2cpp, so none of the generated source files are missing.) Then shut down VS 7 and start VS 8. Use the conversion wizard that opens when you open the All.sln file. The conversion to VS 8 project files then proceeds without errors.

    Thereafter, I had no problems getting Ice to build with VS 8, and all the tests passed. To get things to compile and link correctly, you have to set up your VS 8 directory information though, so VS 8 can find the Ice include files, executables, and libraries. Did you maybe forget that last step?

    Cheers,

    Michi.

  5. #5
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181
    hi,michi,
    I tried to compile the source codes with vc8.0 following your steps.
    1) First compile them with vc7.1, everything is ok
    2) Close vc7.1 ,open vc 8.0 and set the Ice include files, executables, and libraries. Now start to build all .
    However some errors occur :

    Assertion Failed!
    Program: slice2cpp.exe
    file: RecMutex.cpp
    line:27

    Expression: _count==0



    Then I tried to rebuild a single project helloc, failed too. Here is the blog:

    Build Log Rebuild started: Project: helloC, Configuration: Debug|Win32
    Command Lines Creating temporary file "d:\Ice-3.0.0\demo\Ice\hello\Debug\BAT00013528522928.bat" with contents
    [
    @echo off

    ..\..\..\bin\slice2cpp.exe Hello.ice



    if errorlevel 1 goto VCReportError

    goto VCEnd

    :VCReportError

    echo Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"

    exit 1

    :VCEnd
    ]
    Creating command line """d:\Ice-3.0.0\demo\Ice\hello\Debug\BAT00013528522928.bat"" "
    Output Window Performing Custom Build Step
    Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
    Results Build log was saved at "file://d:\Ice-3.0.0\demo\Ice\hello\Debug\BuildLog.htm"
    helloC - 1 error(s), 0 warning(s)


    BTW: in the install.windows, I notice a piece of advice that third part souce codes should be recomplied in vc8.0. I once tried but failed. Now in your step, it seems to use the binaries produced by vc7.1, is it ok?

    Thanks alot
    OrNOt
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

  6. #6
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    Ah, I forgot to mention. After the conversion, before you kick off the build with VS 8, you need to clean the solution. I had no problems compiling against the binary third-party packages with VS 8, but you must compile in release mode, I believe.

    Cheers,

    Michi.

  7. #7
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181
    sorry, Michi, I still can not get a clean build . There are more or less errors. . Maybe I need to change a computer to try again .

    Anyway, Thank you very much.
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

  8. #8
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294

    Visual Studio .NET 2005 support

    The next Ice release will provide better support for Visual Studio 2005; for 3.0, we had too little time between the VS2005 release and our own release.

    If you want to build Ice with VS2005, the first step is to build all third-party packages (Berkeley DB, Bzip2, Expat and OpenSSL) with VS2005. In particular you need to:
    - build Berkeley DB and Bzip2 is both debug and release configurations
    - manually embed the VS2005-generated manifest file in various binaries.
    E.g.:
    Code:
    C:\Ice-ThirdParty-VC80-x86\bin>mt.exe -manifest openssl.exe.manifest -outputresource:openssl.exe;1
    C:\Ice-ThirdParty-VC80-x86\bin>mt.exe -manifest ssleay32.dll.manifest -outputresource:ssleay32.dll;2
    C:\Ice-ThirdParty-VC80-x86\bin>mt.exe -manifest libeay32.dll.manifest -outputresource:libeay32.dll;2
    C:\Ice-ThirdParty-VC80-x86\bin>mt.exe -manifest bzip2.dll.manifest -outputresource:bzip2.dll;2
    C:\Ice-ThirdParty-VC80-x86\bin>mt.exe -manifest bzip2d.dll.manifest -outputresource:bzip2d.dll;2
    Also, there is no need to go through an intermediary VC71 update. You can directly convert the Ice project files (in Visual Studio 6 format) to the Visual Studio 2005 format.

    Once properly built, Ice is fully supported with VS2005; in particular if you run the Ice test suite, all tests are expected to succeed.

    Best regards,
    Bernard
    Last edited by bernard; 11-21-2005 at 06:39 PM.
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VC++ 6.0 with Ice-3.4.0
    By Yos in forum Help Center
    Replies: 1
    Last Post: 04-12-2010, 05:55 PM
  2. vc 6 link error
    By mwilson in forum Help Center
    Replies: 5
    Last Post: 02-13-2007, 07:15 PM
  3. How to use Ice with vc.net
    By W.noon in forum Help Center
    Replies: 1
    Last Post: 10-27-2004, 08:43 AM
  4. vc static lib
    By hellocyf in forum Help Center
    Replies: 2
    Last Post: 08-04-2004, 10:53 PM
  5. Compiling ICE with VC 6.0
    By jpm in forum Help Center
    Replies: 2
    Last Post: 05-30-2003, 05:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •