×

Discussion Board

Results 1 to 7 of 7

Thread: weird error

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    1

    weird error

    Ive just installed Carbide, and I've noticed that the code editor displays an error on _LIT() macro lines between the name and the value of the literal. when I hover over it with a cursor it just says "Syntax error encountered". This is not displayed in the Problems view and does not stop the code from compiling, so it seems harmless. Still it's kind of annoying. Does anyone know how to get rid of this?
    Thanks

  2. #2
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: weird error

    hi,

    The syntax for using _LIT

    is

    _LIT(MyName,"I'm a Forum Member");

    or check the sdk help of ur sdk .....
    on how to use the macros in symbian.

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    20

    Re: weird error

    I have the same problem. The syntax should be fine:

    _LIT(MyName,"I'm a Forum Member");

    I'm using SDK 2.0 for CW.

  4. #4
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: weird error

    hi,

    Very Strange ...

    on code warrior IDE it works fine ...
    _LIT(Myname,"I'm a FN member ");

    and in Vc++ and i didn't test it on carbide coz i don't like to use it ..

    and the syntax is also correct in the header
    /**
    @publishedAll
    @released

    Constructs a build independent constant literal descriptor of type TLitC<TInt>
    with the specified name and text.

    An 8-bit build variant is generated for a non-Unicode build;
    A 16-bit build variant is generated for a Unicode build.

    @param name The name of the C++ variable to be generated.
    @param s The literal text enclosed within a pair of double quotes.

    @see _LIT16
    @see _LIT8
    */
    #define _LIT(name,s) const static TLitC<sizeof(L##s)/2> name={sizeof(L##s)/2-1,L##s}

    This is stange and weird check in the help of carbide release notes and better check with the people working on carbide might be mitts might help u as he knows it better in carbide ....

    Thanks and Regards,
    Mateen Maldar M
    Last edited by mateen_maldar; 2006-11-11 at 04:36.
    "Whatever the mind can conceive and believe, the mind can achieve"

  5. #5
    Super Contributor
    Join Date
    Oct 2005
    Location
    Hyderabad,India
    Posts
    1,156

    Re: weird error

    Hi mateen_maldar and claudiaresa,
    i just tried in Carbide c++ v 1.1 and i dont get such an error " Syntax error encountered" rather the _LIT works pretty well as expected.

    By,
    Priju

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: weird error

    Hi,

    the way you use the macro is definitely correct. To double check it I tried it under MSVC 6.0 and Carbide.c++ 1.1, so the error must be somewhere else... Did you include the header with _LIT macro definition?

    Regards,
    STeN

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

    Re: weird error

    From the Carbide.c++ Release Notes, I think this is what you are seeing:

    Summary: [CDT Indexer] _LIT macros confuse the indexer and show error markers in the source view.

    Workaround: These error markers are benign and can be ignored. If you don't want to see them disable the following checkbox under: Window > Preferences > C/C++ > Editor > Hovers (Tab) > Enable editor problem annotation.

    Tim

Similar Threads

  1. problem with Code Warrior 5.2
    By mayankkedia in forum Symbian
    Replies: 4
    Last Post: 2006-06-22, 08:26
  2. help !! about SIP errors
    By wgarnett in forum Symbian
    Replies: 3
    Last Post: 2006-05-17, 05:30
  3. S80 Platform SDK and Visual Studio .NET Linking Error
    By jayantjain in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2005-10-07, 22:14
  4. code warrior problems
    By mayankkedia in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2004-10-25, 06:59
  5. Cannot compile SDK's examples for 7650 platform...
    By midletsoft in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-08-12, 19:11

Posting Permissions

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