×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    26

    Is the export keyword defined in symbian

    I am trying to compile an open source library written in c. A lot of the function declarations begin with the EXPORT keyword. (one example below)
    Compiling the code as is causes 103 instances of the same error(probably one for each function), "declaration syntax error". I have tried replacing the EXPORT keyword with blank space and the keyword extern. In both cases the compile completes successfully with some warnings. When I import the resulting .lib file into my QT application , I get the error "COMDAT symbol '.exc$T' does not match section name '.rdata' " .
    I am guessing this is to do with me replacing the EXPORT keyword. Is the export keyword defined in symbian C++. If not what alternate should I use, please help!
    eg -

    EXPORT void speex_bits_init(SpeexBits *bits)
    {
    bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME);
    if (!bits->chars)
    return;

    bits->buf_size = MAX_CHARS_PER_FRAME;

    bits->owner=1;

    speex_bits_reset(bits);
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Is the export keyword defined in symbian

    Well, the second hit Google finds for speex symbian links back to this site, and contains the location of a Symbian port of Speex.

    Otherwise EXPORT in all upper case is most probably a macro, so you could find its definition (the IDE-s can help in that, check the context menu, it is F3 in Carbide.c++), and modify it to an empty #define EXPORT

  3. #3
    Registered User
    Join Date
    Aug 2010
    Posts
    26

    Re: Is the export keyword defined in symbian

    Thanks for the help. I am now able to compile the speex library with zero warnings and zero errors. However, I get errors in my QT mobile application when I import the library. To import the library I add the following line to my .pro file -

    LIBS += C:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\release\winscw\urel\speex.lib

    The error I get is -

    :: error: C:\Nokia\devices\Nokia_Symbian3_SDK_v0.8\epoc32\release\winscw\urel\speex.lib(bits.obj): warning: COMDAT symbol '.exc$T' does not match section name '.rdata'

    Please help!

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Is the export keyword defined in symbian

    bits.obj is something which is created from bits.cpp (or .c) - you could check if that file contains 'strange' code.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Is the export keyword defined in symbian

    Linking directly to a WINSCW version of a library will surely fail e.g. on GCCE/ARMV5 target. Better use
    Code:
    LIBS += -lspeex
    and let the build toolchain figure out the correct library paths for each build.

  6. #6
    Registered User
    Join Date
    Aug 2010
    Posts
    26

    Re: Is the export keyword defined in symbian

    To Make sure that the problem is not with the speex library, I created my own static library using carbide C++. I just used the default template for a static library. I did not make any changes to the code generated by carbide. I just compiled it, now when I do a nm on mylib.lib I get the following output -

    $ nm mylib.lib
    BFD: mylib.lib(mylib.obj): warning: COMDAT symbol '.exc$T' does not match section name '.rdata'

    mylib.obj:
    00000000 b .bss
    00000000 r .exc$BBB
    00000000 r .exc$T
    00000000 t .text
    00000000 T ?DummyFunction@@YAHXZ
    00000010 b ?KNullDesC16@@3V?$TLitC16@$00@@B
    00000008 b ?KNullDesC8@@3V?$TLitC8@$00@@B
    00000000 b ?KNullDesC@@3V?$TLitC@$00@@B
    00000000 r exc$bbb_5

    Pay attention to the line complaining about COMDAT symbol not matching section name. Also when I import the library into QT I get the same error. This looks like a problem in the way I am using the development tools or my environment setup. Please help!

Similar Threads

  1. any platform macro defined about Symbian^3?
    By gameryf_ak47 in forum Symbian
    Replies: 3
    Last Post: 2010-12-18, 16:30
  2. super keyword in java vs symbian c++
    By nguyend in forum Symbian
    Replies: 1
    Last Post: 2010-03-10, 09:09
  3. Replies: 7
    Last Post: 2009-09-09, 07:38
  4. Confusion on Some Symbian defined Classes
    By symbiUser in forum Symbian
    Replies: 4
    Last Post: 2008-02-26, 05:44
  5. Carbide developer wont import EXPORT commands from EXPORT.MAKE
    By jimgilmour1 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2006-10-26, 06:27

Posting Permissions

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