Results 1 to 9 of 9

Thread: Problem linking when migrating to Ice 3.3.1

  1. #1
    c_cube is offline Registered User
    Name: Cheung Chau
    Organization: TRG Management LP
    Project: Using Ice to build a SOA applications
    Join Date
    Apr 2009
    Posts
    2

    Problem linking when migrating to Ice 3.3.1



    I got linking error when building my Ice-related project in VC 2003 using Ice 3.3.1 and here is one of the sample error

    Linking...
    Creating library ..\Lib\TRGTimeSeries-mt-1_0.lib and object ..\Lib\TRGTimeSeries-mt-1_0.exp
    TRGIceStubs-mt.lib(dsl.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl IceInternal::LocalExceptionWrapper::throwWrapper(c lass exception const &)" (__imp_?throwWrapper@LocalExceptionWrapper@IceInte rnal@@SAXABVexception@@@Z)

    If I switch it back to Ice-3.2.1. everything works fine. Any Idea?

    Thx

    c_cube

  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
    Have you cleaned your project? Most likely, a previously compiled object file is still lying around that wasn't recompiled after your upgrade. If that object file contains an external reference to a symbol in the Ice library that has changed, you get that kind of error.

    Make sure that you are starting with a clean slate by removing all previously-compiled object files, and things should work OK.

    Cheers,

    Michi.

  3. #3
    c_cube is offline Registered User
    Name: Cheung Chau
    Organization: TRG Management LP
    Project: Using Ice to build a SOA applications
    Join Date
    Apr 2009
    Posts
    2
    Hi Michi,

    Thank you for taking the time responding to my post. Yes, I did clean all projects and did a rebuild all in VC 2003.

    One thing I notice is that IceInternal::LocalExceptionWrapper::throwWrapper is a method got added to Ice 3.3.1. I know that because I have compared the output of slice2cpp. I was able to compare all my ice file into cpp and header file and generated obj files and link them into a lib (let's call it icestubs.lib)

    The error stated in my original post occurs when other projects are trying to reference icestubs.lib in the linking process.

    How to confirm the method exists in ice.lib and iceutil.lib in my C:\Ice-3.3.1\lib folder? Thank you for your help again

    c_cube

  4. #4
    RonnieDay is offline Registered User
    Name: Ronnie Day
    Organization: RBCCM
    Project: FIC Pricing
    Join Date
    Mar 2011
    Posts
    12
    Did you find a resolution to this? I am having the same problem. However I have only ever used ice 3.4.1

  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
    Hi Ronnie,

    Can you paste the error message you're getting, and also include information about your environment (Visual Studio version, debug or release, Win32/x64 target etc.)?

    Maybe we'll be able to spot the issue.

    All the best,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  6. #6
    RonnieDay is offline Registered User
    Name: Ronnie Day
    Organization: RBCCM
    Project: FIC Pricing
    Join Date
    Mar 2011
    Posts
    12
    the error message I am receiving is:


    felixExample error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl IceInternal::LocalExceptionWrapper::throwWrapper(c lass exception const &)" (__imp_?throwWrapper@LocalExceptionWrapper@IceInte rnal@@SAXABVexception@@@Z) referenced in function __catch$?getDieselElement@DieselService@DieselServ iceModule@service@pricing@aurora@rbccm@com@IceDele gateD@@UAE?AUDieselElement@234567@ABV?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00 PBV?$map@V?$basic_string@DU?$char_traits@D@std@@V? $allocator@D@2@@std@@V12@U?$less@V?$basic_string@D U?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V? $allocator@U?$pair@$$CBV?$basic_string@DU?$char_tr aits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@s td@@@Z$0


    I am using this as my ice file:


    #ifndef AURORA_ICE
    #define AURORA_ICE

    //-----------------------------------------
    module com
    {
    module rbccm
    {
    module aurora
    {
    module pricing
    {
    module service
    {
    module DieselServiceModule
    {

    enum DieselErrorEnum { InstrumentNotFound, UserNotFound, InvalidUserDataFormat,
    UserDataObjectError, NotImplementedError, DieselServiceError, NoProxyError };

    exception BaseException {
    string reason;
    };

    exception DieselServiceException extends BaseException {
    DieselErrorEnum dieselError;
    };

    sequence<byte> SdObjectBytes;

    dictionary<string, string> DieselAttributeMap;

    struct DieselElement
    {
    string name;
    DieselAttributeMap attributeMap;
    };

    interface DieselService
    {
    DieselElement getDieselElement(string region, string cacheObjectId, string elementName) throws DieselServiceException;
    bool setDieselElement(string region, string cacheObjectId, DieselElement element) throws DieselServiceException;

    string getSdObjectXml(string region, string cacheObjectId) throws DieselServiceException;
    bool setSdObjectXml(string region, string cacheObjectId, string sdObjectXml) throws DieselServiceException;

    SdObjectBytes getDieselObject(string region, string cacheObjectId, string attribute) throws DieselServiceException;
    bool setDieselObject(string region, string cacheObjectId, SdObjectBytes sdObject) throws DieselServiceException;
    };
    };
    };
    };
    };
    };
    };
    //-----------------------------------------

    #endif

    and using slice2cpp.exe to generate the cpp code.

    I am running vs2003 on an xp box. I have also included both iced.lib and iceUtild.lib to the project settings.

    any ideas ?

  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 Ronnie,

    Quote Originally Posted by RonnieDay View Post

    I am running vs2003 on an xp box. I have also included both iced.lib and iceUtild.lib to the project settings.
    If that's not a typo, the issue is the version of Visual Studio you're using. With Ice 3.4.1, you need either Visual Studio 2008 or 2010 (for 2010, use lib and bin in the vc100 sub-directory).

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  8. #8
    RonnieDay is offline Registered User
    Name: Ronnie Day
    Organization: RBCCM
    Project: FIC Pricing
    Join Date
    Mar 2011
    Posts
    12
    I wish it was a typo. I am dealing with legacy software. Is there anyway at all to use vs2003 ?

  9. #9
    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 Ronnie,

    You could use an old version of Ice with support for Visual Studio 2003:
    http://www.zeroc.com/download_3_2_1.html

    If you have other Ice components (clients, servers) without this old compiler requirement, I would recommend to use the latest Ice version for them. All versions of Ice inter-operate with each other.

    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. Trouble migrating to 3.2 in VC71
    By Kruppy in forum Help Center
    Replies: 2
    Last Post: 03-27-2007, 02:19 PM
  2. Problems migrating fron IcePack to IceGrid
    By xdm in forum Help Center
    Replies: 2
    Last Post: 12-21-2005, 11:08 AM
  3. Linking problem with PowerTV OS
    By dimarzt in forum Help Center
    Replies: 3
    Last Post: 10-20-2005, 05:22 PM
  4. Migrating objects between machines
    By Nis Baggesen in forum Help Center
    Replies: 6
    Last Post: 02-17-2005, 07:36 AM
  5. Linking problem in Linux
    By amrufon in forum Help Center
    Replies: 2
    Last Post: 10-27-2003, 09:27 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
  •