×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    61

    Unhappy Problem with resource

    Hi all,

    I'm new to Symbian Programming and I have a problem that I can't solve.
    I have to change a part of an application written with Symbian C++.

    I want to insert the ability to connect to other devices so I ha imported the needed classes from the BtpoitToPoint example that come with the SDK.

    The problem is that some identifier are undeclared for the compiler and it give me some errors:

    Example:

    ..\\SRC\\Apaclient.cpp:177: `R_BTPO_DISCONNECT_COMPLETE' undeclared
    ..\\SRC\\Apaclient.cpp:187: `R_BTPO_ERR_FAILED_TO_DISCONNECT' undeclared

    I have inserted this identifier in my resource file as follow:

    RESOURCE TBUF r_btpo_disconnect_complete
    {
    buf = qtn_btpo_disconnect_complete;
    }
    RESOURCE TBUF r_btpo_failed_to_disconnect
    {
    buf = r_btpo_failed_to_disconnect;
    }

    And defined qtn_btpo_disconnect_complete, r_btpo_failed_to_disconnect in my .loc file.

    There is a problem with my code or it is a problem of setting the right path so that the compiler find the resource file? How can I solve it?

    Thanx in advance!

  2. #2
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    61

    Re: Problem with resource

    please if you can help me... is very important and urgent for me!

    Or if not, if you can suggest me where to look to solve this problem!

    Thank you!

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    41

    Re: Problem with resource

    Do you include the rsg-file? #include <your_app.rsg>

  4. #4
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    61

    Re: Problem with resource

    yes, it is included...

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Problem with resource

    I suggest you open your .rsg file and check what is acually defined in it. I can see at least one error in the code, in that R_BTPO_ERR_FAILED_TO_DISCONNECT is being used in the CPP code but the resource is declared as r_btpo_failed_to_disconnect

    Alternativly just delete the rsg file and do a full rebuild. The RSG file should be in the sdk include folder, not the project folder.

  6. #6
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    61

    Re: Problem with resource

    also, the .rsg file is in the include foler. I have cancelled it but what mean

    delete the rsg file and do a full rebuild
    I only obtain some compilation errors and the file .rsg is not generated. Also if the compilation success the .rsg file is not generated. Maybe is generated somewhere else? What I have to check?

    Thank you very much

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Problem with resource

    the .rsg file will be in the "<Your symbian installation folder>\<Platform>\Epoc32\include" folder.

    the RSG is obviously being generated otherwise you would have got a missing include file error at the start of the compile for that file.

  8. #8
    Registered User
    Join Date
    Jul 2004
    Posts
    93

    Re: Problem with resource

    do the follow might help:
    close your emulator first (everytime you changed rss and loc files)
    run abld reallyclean at your group folder (in command prompt)
    run bldmake clean
    run bldmake bldfiles
    run abld build wins udeb

    if errors prompt again, please check followings:
    1) rss file is include in your .mmp file
    2) the resource you need is defined in rss file
    3) error is point to rss or cpp?
    if rss, double check rss and make sure it is okay
    if cpp,
    4) make sure you include <your_app.rsg> use <> instead of ""
    5) make sure your mmp has SYSTEM_INCLUDE \epoc32\include\
    6) make sure you CAPTIALIZED your resource link name in cpp file

    if still have problem, then i couldn't help you unless you show me your error messages.

    luke

  9. #9
    Regular Contributor
    Join Date
    Oct 2005
    Location
    London, UK
    Posts
    235

    Re: Problem with resource

    Just incase anyone else searches and finds this thread for this problem, if you're using VS .NET and the ONLY error(s) you're getting are undeclared identifier('s) that you've added to your .rss when you do a debug build then do a target build instead. Then the debug build will compile.

    A bit quicker than lukedau's method

    It seems the debug build doesnt recreate the .rsg (.rss) file as it should. Bug?

    ViruDoshi
    ~ No Style Without Substance ~

Similar Threads

  1. Link problem when define own CBA resource
    By doctordwarf in forum Symbian
    Replies: 3
    Last Post: 2009-07-10, 04:19
  2. Replies: 4
    Last Post: 2005-12-19, 15:59
  3. Problems with CBA resource in 2nd Resource File.
    By colinlawrence in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2004-02-17, 02:47
  4. Nokia 9200 : problem about resource
    By Symerdog in forum Symbian
    Replies: 0
    Last Post: 2004-01-10, 14:16
  5. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

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