Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003

    Lightbulb Conflict between estlib and MSL_ALL_MSE_Symbian_D.lib in CodeWarrior

    After having encountered this problem twice in as many days and as many projects, I thought this is worth a note (and a question to Nokia...).

    It seems that when including static libraries to a project using the STATICLIBRARY keyword in the MMP, and these static libraries reference functions from the C standard library (estlib), such as calloc() or fgets(), these calls will under some circumstances cause implementations from MSL_ALL_MSE_Symbian_D.lib (the MWCC runtime library for Symbian) to be linked in, which causes a crash in the emulator when those functions are used, because their environment is not properly initialized in Symbian.

    Apparently the CW linker decides on thefunctions to import from estlib only based on references from the current MMP, but not from any STATICLIBRARY libs - and when it finds out that it does need the functions after all, it gets them from MSL_ALL_MSE_Symbian_D.lib.

    Note: my experience refers to using the WINSCW command line build, not building from the IDE. However, I believe the problem appears there as well.

    A workaround is to force a reference from the main project, such as

    void* dummy = calloc;

    for every function that is causing trouble.

    Now for the question to Nokia - why are there implementations of stdlib functions in MSL_ALL_MSE_Symbian_D.lib at all, when these implementations are actually broken for Symbian? Some functions in there are needed for the "mechanics" of C++ code, and usually the duplicate references cause no harm (apart from warnings such as these: http://discussion.forum.nokia.com/fo...ad.php?t=67106) - but they have the potential for confusing bugs...

  2. #2
    Registered User
    Join Date
    Mar 2003

    Re: Conflict between estlib and MSL_ALL_MSE_Symbian_D.lib in CodeWarrior

    I'm facing exactly the same problem with Open C, does anyone have other workarounds than one told by mroeber9110?
    Last edited by antjan77; 2007-10-18 at 07:49.

Posting Permissions

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