×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    13

    Static library build error for GCCE on CodeWarrior 3.1 Pro.

    I need to build a static library by using S60 3rd edition for Symian 9.1 OS on CodeWarrior 3.1 Pro. I always meet the link error for "GCCE" build like below:
    ------------------------------
    1. tool exit status == 255
    2. EPOCROOT must end with a backslash
    ------------------------------

    But, there is no problem to build the same library for "WINSCW". Currently, I can only use symbian command line to build it manually.

    However, this problem doesn't happend to build "EXE" or "DLL" targets. I tried to change EPOCROOT setting around and finally gave up because I don't think the problem is really caused by EPOCROOT setting.

    Talking about static library, Symbian SDK 3rd documentation doesn't really mention it although it still supports the target type. I guess SDK enourages to use DLL instead of LIB. But, sometimes LIB is still required.

    My question is whether CodeWarrior doesn't really want to support the "static library" target type. As a matter of fact, there are only two target types "EXE" and "DLL" if we start to create a new project by using CW wizard.

    I will appreciate it if my problem could be solved here by some way.

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2004
    Location
    Austin, TX
    Posts
    399

    Re: Static library build error for GCCE on CodeWarrior 3.1 Pro.

    You should be able to build static libs. They aren't really Symbian specific (i.e. no special Symbian code in them) so there's no template wizard for them (although there is a template project for libs in Carbide.c++)

    I don't know about the error 255, especially since it only happens for GCCE. Might help to log the command-lines and post the command-where the error comes from (see Symbian Common pref). Also, you might cut-and-paste the command into a dos console and see if you get the same error.

    Tim

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    13

    Re: Static library build error for GCCE on CodeWarrior 3.1 Pro.

    Thanks, Tim! Your point is really helpful. I checked the compiling command used by CodeWarrior and found the "ar.exe" tool isn't available in SDK ("epoc32\gcc\bin"). So, I found one from somewhere and pasted there. Right now, CodeWarrior can build static libraries successfully. But, I need to test it later to see if the library is linked correctly.

    Symbian's command line uses different tools and makes much smaller libraries.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    Re: Static library build error for GCCE on CodeWarrior 3.1 Pro.

    This should also work:

    Change ar to arm-none-symbianelf-ar within your cwlink file. Example:
    <simple>arm-none-symbianelf-ar cr ${output}\${output.file.name} ${var:LINK_OBJS} ${var:LIBS}</simple>

    Hope this helps...

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    13

    Re: Static library build error for GCCE on CodeWarrior 3.1 Pro.

    Just found your reply. Your approach is another working solution. Thanks for help!

  6. #6
    Registered User
    Join Date
    Jun 2007
    Posts
    10

    Re: Static library build error for GCCE on CodeWarrior 3.1 Pro.

    Hi Friends,
    i need to build static library (.lib) which is written in C.

    I don't want to put ar.exe in Epoc32/gcc/bin.
    I tried another solution
    As u told, Change ar to arm-none-symbianelf-ar within your cwlink(GCCE urel and GCCE UDEB) file. Example:
    arm-none-symbianelf-ar cr ${output}\${output.file.name} ${var:LINK_OBJS} ${var:LIBS}

    But still i am not able to build .lib.
    I also tried it from command line it is throwing following warnings:

    cc1.exe: warning: command line option "-Wno-ctor-dtor-privacy" is valid for C++/
    ObjC++ but not for C
    warning: no newline at end of file.

    Please help me out.

    Waiting for ur quick response..

  7. #7
    Regular Contributor
    Join Date
    Jun 2007
    Location
    INDIA
    Posts
    73

    Re: Static library build error for GCCE on CodeWarrior 3.1 Pro.

    You just posted the warning, could you plz let us know the exact error.

    /* From man g+
    -Wctor-dtor-privacy (C++ only)
    Warn when a class seems unusable, because all the constructors or
    destructors in a class are private and the class has no friends or
    public static member functions.
    */
    So it should n't cause that much harm.

    Can you try to compile 'C' files as 'C++' by changing gcce.mk file, C Language options.
    Path: C:\Symbian\9.2\S60_3rd_FP1\Epoc32\tools\compilation_config

    C_LANG_OPTION=-x c++

    cc1.exe: warning: command line option "-Wno-ctor-dtor-privacy" is valid for C++/
    ObjC++ but not for C
    warning: no newline at end of file.

Similar Threads

  1. Fail to build syexpat 1.3 under 2nd FP3
    By harry_zhang in forum Symbian C++
    Replies: 10
    Last Post: 2010-03-19, 10:24
  2. please help me for my static library
    By tonyrobertson in forum Symbian C++
    Replies: 1
    Last Post: 2006-02-27, 11:57
  3. Can’t launch application on 6630
    By kaffemannen in forum Symbian C++
    Replies: 8
    Last Post: 2005-06-29, 10:49
  4. Replies: 3
    Last Post: 2005-04-11, 20:00
  5. some problems with label
    By vivienzhung in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-21, 09:52

Posting Permissions

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