Results 1 to 7 of 7

Thread: Ice 3.0.1 & Visual Studio 2005 (Express edition)

  1. #1
    albertods is offline Registered User
    Name: Alberto Della Santina
    Organization: University of Pisa - department of IT Engineering
    Project: Mobile remote controller
    Join Date
    Feb 2006
    Location
    Pisa (Italy)
    Posts
    58

    Ice 3.0.1 & Visual Studio 2005 (Express edition)

    Hello,
    I tried to move my development from linux to windows in order to work with another C++ IDE than suits better my needs than KDevelop (except Eclipse), and I'm using the new Visual Studio 2005 express edition, that is free of charge.

    With the package downladable from the ZeroC website, with all the PATH set properly and with the right directories set in the properties of VS, I'm able to compile without errors all the demos included in the package.
    The problem comes when I want to create a new project for example called ChatClient, which has the same sources as ChatC just to learn the usage of VS with Ice. Consider that the "Custom build step" for the file .ice is correctly set.

    In the linking phase I get this kind of error (several times):
    Client.obj : error LNK2005: "void __cdecl IceInternal::incRef(class Demo::ChatCallback *)" (?incRef@IceInternal@@YAXPAVChatCallback@Demo@@@Z) already defined in Chat.obj

    ...and these errors (again...several times):
    Chat.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall IceProxy::Glacier2::Session::Session(void)" (__imp_??0Session@Glacier2@IceProxy@@QAE@XZ) referenced in function "public: __thiscall IceProxy::Demo::ChatSession::ChatSession(void)" (??0ChatSession@Demo@IceProxy@@QAE@XZ)
    Client.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall IceProxy::Glacier2::Session::Session(void)" (__imp_??0Session@Glacier2@IceProxy@@QAE@XZ)


    What are the causes of these errors?
    I have followed the instructions presented in this post:
    http://www.zeroc.com/vbulletin/showthread.php?t=240


    Thank you in advance


    With my very best regards



    Alberto
    Alberto Della Santina
    IT Engineering Department
    University of Pisa (Italy)
    www.ing.unipi.it
    www.iet.unipi.it

  2. #2
    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
    Hi Alberto,

    This looks like a project properties problem; you should double-check in particular Configuration Properties/C/C++/Code Generation/Runtime Library. It should be Multi-threaded Debug (if you link with Iced.lib) or Multi-threaded Release (if you link with Ice.lib).

    If you can't figure it out, please attach your project file (.vcproj).

    For the unresolved Glacier2 symbols, you need to link with Glacier2, i.e. add glacier2.lib to your list of libraries.

    Cheers,
    Bernard
    Last edited by bernard; 05-18-2006 at 12:41 PM.
    Bernard Normier
    ZeroC, Inc.

  3. #3
    albertods is offline Registered User
    Name: Alberto Della Santina
    Organization: University of Pisa - department of IT Engineering
    Project: Mobile remote controller
    Join Date
    Feb 2006
    Location
    Pisa (Italy)
    Posts
    58
    Hi Bernard,
    thank you very much for your quick reply to my post.

    Unfortunately the MultiThreaded Debug is properly set, using the Iced.lib IceUtild.lib libraries, I can't figure out where is the problem.

    You will find attached the project file (compressed).

    Where sould I specify the link to the glacier2.lib?


    Thank you


    Cheers


    Alberto
    Attached Files Attached Files
    Alberto Della Santina
    IT Engineering Department
    University of Pisa (Italy)
    www.ing.unipi.it
    www.iet.unipi.it

  4. #4
    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
    Hi Alberto,

    Please try to set
    Configuration Properties/C/C++/Language/Enable Run-Time Type Info to Yes

    'Yes' should be the default, but I don't see anything else suspicious in your project file. Don't forget to rebuild your application afterwards.

    You also need to add 'glacier2d.lib' [debug] or 'glacier2.lib' [release] to
    Configuration Properties/Linker/Input/Additional dependencies.

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  5. #5
    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
    Could you post Client.cpp?

    Thanks,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  6. #6
    albertods is offline Registered User
    Name: Alberto Della Santina
    Organization: University of Pisa - department of IT Engineering
    Project: Mobile remote controller
    Join Date
    Feb 2006
    Location
    Pisa (Italy)
    Posts
    58
    Dear Bernard,
    sorry for the inconvenience!

    I've resolved everything! It was just a mispelling...

    Thanks a lot for your help!

    Do I have to include only the needed libraries for the project? For example: this one needs: Iced.lib IceUtild.lib glacier2d.lib
    In the case I would include all of them for a "simple" project like this, will I experience a big loss of performance?
    I'm asking this just not to remember to take care also of the properties of the project when I will write some more complicate source codes.



    Thanks again


    Sincerely


    Alberto


    With my very best regards
    Alberto Della Santina
    IT Engineering Department
    University of Pisa (Italy)
    www.ing.unipi.it
    www.iet.unipi.it

  7. #7
    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
    Hi Alberto,

    Glad to hear you figured it out!

    You can list as many libraries as you like: Visual C++ will only use the ones it needs: there is no downside. However this is not true on all platforms; for example on Linux and Solaris, you'd better link with only the libraries you need.

    Cheers,
    Bernard
    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. Replies: 2
    Last Post: 06-29-2009, 09:00 AM
  2. Visual Studio 2008 Express and C#
    By tcorvin in forum Help Center
    Replies: 1
    Last Post: 03-27-2009, 04:36 PM
  3. Visual Studio Express 2005 C++ compiler error
    By blonder in forum Help Center
    Replies: 6
    Last Post: 05-22-2007, 10:04 AM
  4. visual Studio & ice 3.0 & Global Assembly Cache
    By loheron in forum Help Center
    Replies: 7
    Last Post: 11-23-2006, 07:39 AM
  5. Visual Studio 2005 C# ICE Issues
    By jborg in forum Bug Reports
    Replies: 3
    Last Post: 12-23-2005, 05:42 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
  •