×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    2

    Linking problem with CW (relocation truncated to fit: ARM_26 etc.)

    Noticed a strange problem while trying to use inline functions..

    -- class(CTestBitmap) interface definition :: BEGINING ----------
    ..
    void Clear(const TRgb& aRgb);
    ..
    -- class(CTestBitmap) interface definition :: END ---------------


    -- class(CTestBitmap) code :: BEGINING -----------------------
    ..
    inline void CTestBitmap::Clear(const TRgb& aRgb) { ... }
    ..
    -- class(CTestBitmap) code :: END ----------------------------


    Compiler complains following:
    ---------------------------

    Errors caused tool to abort.

    Link Error : Undefined symbol: 'void TestNamespace::CTestBitmap::Clear(class TRgb const &) (?Clear@CTestBitmap@TestNamespace@@QAEXABVTRgb@@@Z)'

    Link Error : referenced from 'void TestNamespace::CTestEngine::ConstructL(void) (?ConstructL@CTestEngine@TestNamespace@@AAEXXZ)' in test_engine.cpp:211

    Link Error : Link failed

    test_engine.cpp::211 --> iBitmap->Clear(TRgb(255, 0, 0));

    So what's wrong? If I take inlining away code works like a charm, but with inline everything is fucked up!

    EDIT: Using 6.1 SDK and "relocation truncated.." shows only while compiling to the target device (ARM).

    EDIT2: Maybe this a consequence of using factory contructor(NewL)?
    Last edited by jani.nurminen; 2006-01-19 at 21:51.

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2004
    Location
    Austin, TX USA
    Posts
    271

    Re: Linking problem with CW (relocation truncated to fit: ARM_26)

    I'd like to see the code where you allocate this object, please. So this error only occurs when compiling for ARM, and not WINSCW? If so, it might be a problem with the GNU C++ compiler.

    Regards,

    Matt P.

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    2

    Re: Linking problem with CW (relocation truncated to fit: ARM_26)

    Quote Originally Posted by mpinsonneault
    I'd like to see the code where you allocate this object, please. So this error only occurs when compiling for ARM, and not WINSCW? If so, it might be a problem with the GNU C++ compiler.

    Regards,

    Matt P.
    Problem solved Inlined functions was implemented in .cpp so other compilation units didn't get the implementation (definition) of the inline functions. So I added a .inl file and included that to header..
    Last edited by jani.nurminen; 2006-02-01 at 12:23.

Similar Threads

  1. Problem MMC+USB Connection
    By Fede81 in forum General Development Questions
    Replies: 3
    Last Post: 2006-07-19, 15:21
  2. Problem of "abld build thumb urel"
    By djj718 in forum Symbian
    Replies: 10
    Last Post: 2003-09-10, 13:29
  3. Linking problem using RDbNamedDatabase
    By paulrenn in forum Symbian
    Replies: 1
    Last Post: 2003-06-23, 08:01
  4. linking .exp file problem
    By skdas in forum Symbian
    Replies: 0
    Last Post: 2003-04-23, 07:58
  5. DLL::TLS() Problem
    By ram9210 in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-08-07, 07:34

Posting Permissions

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