My application is giving me an empty _reg.rsg file. Why is that? Please help..
Thanks in advance!
Sherif
My application is giving me an empty _reg.rsg file. Why is that? Please help..
Thanks in advance!
Sherif
copy and edit C:\Symbian\9.2\S60_3rd_FP1\S60Ex\HelloWorldBasic\data\HelloWorldBasic_reg.rss for your project.
The compiled version of the _reg.rss file is intended to be used by the Menu application, that is why you normally do not need a _reg.rsg file for it. Also note that .rsg files do not contain identifiers for unnamed resources, and that is the default case for _reg.rss files (you have a single unnamed APP_REGISTRATION_INFO in it).
So, i am not supposed to get an empty _reg.rsg file? Would this happen if the application is having a problem in reading my resources?
OK, i am observing something else in my build that i would like to mention here.. In one of the View.cpp files, i include <application.rsg> and use a view resource (APPLICATIONNAME_VIEW) that was defined in the rss file. However, upon building the application, i always get this error: undefined identifier APPLICATIONNAME_VIEW. Would this mean that the builder is failing to build my resources? given that it has successfully built the rest of the resources :S
I am using Carbide.vs 3 over Visual Studio 2005.
Thanks in advance.
my _reg.rss file is as follows:
#include <appinfo.rh>
UID2 KUidAppRegistrationResourceFile
UID3 0xXXXXX
RESOURCE APP_REGISTRATION_INFO
{
app_file="MyApplication";
}
I think you have accidentally overlooked the fact that in Symbian 9 (S60 3rd / 5th) a GUI application comes with two resource files:
xy.rss, which is the application's own resource file:
- it is compiled with the HEADER keyword, so there will be a xy.rsg amongst the includes
- this is the file which may contain your view something, however we do not know unless you show
- xy.rsc (the compiled resource) is going to be deployed to \resource\apps
xy_reg.rss, which is the registration file meant to be used by the Menu application
- normally it is compiled without the HEADER keyword, so xy_reg.rsg is not generated
- it contains a single unnamed APP_REGISTRATION_INFO resource (as you can check in yours), so xy_reg.rsg would not be an exciting reading anyway
- it is going to be deployed in \private\10003a3f\[import\]apps
If you have problems with some view resource, show it.
Thanks for your explanation. It was useful to me.
Please find below the part of the RSS file that is problematic:
--------------------------------
RESOURCE AVKON_VIEW r_primatranz_schedule_view
{
menubar = r_primatranz_schedule_menubar;
cba = R_AVKON_SOFTKEYS_SELECTION_LIST;
}
RESOURCE MENU_BAR r_primatranz_schedule_menubar
{
titles =
{
MENU_TITLE { menu_pane = r_primatranz_app_menu; txt = "App"; },
MENU_TITLE { menu_pane = r_primatranz_schedule_menu; txt = "View"; }
};
}
RESOURCE MENU_PANE r_primatranz_schedule_menu
{
items =
{
MENU_ITEM
{
command = EHelp;
txt = s_help;
},
MENU_ITEM
{
command = EAbout;
txt = s_about;
},
MENU_ITEM
{
command = EAknSoftkeyExit;
txt = s_exit;
}
};
}
---------------------------------------------------
In the *.rsg file, I find the above resources already assigned numbers (in the #define statements), but when I am trying to use any of these resources (i already have #include "XXX.rsg" in my code), i get the compile error: identifier not defined! But the rest of the identifiers (in *.rsg file) do not suffer from the same problem.. That's wierd!
Please help..
**By the way: I keep on searching for the *.rsc file, but i never find it. Does this mean there is something serious with my rss file?
Regards,
Sherif
Make sure that you are #include-ing the same .rsg file what you see:
- #include <xy.rsg> would be better syntax, since the file is generated in the middle of the SDK (epoc32\include), so it is a system include
- make sure that you have no xy.rsg (probably an outdated one) copied directly to your project
If you can not find xy.rsc in epoc32\data\z\resource\apps (after a target build) or epoc32\release\winscw\udeb\z\system\apps (after an emulator build), that is a problem. However this is unlikely, since in this case you would not get the #define-s for the new resources.**By the way: I keep on searching for the *.rsc file, but i never find it. Does this mean there is something serious with my rss file?
I already did the above..
But I really can't find .rsc anywhere! And the strange thing is that one application was successfully running without finding any rsc for it!
I am copying my pkg file below:
; PrimaTranZ.pkg
;
;Language - standard language definitions
&EN
;Standard SIS file header
#{"PrimaTranZ"},(0xecb6ce86),1,0,0
;Localised Vendor name
%{"PrimaTranZ-EN"}
;Unique Vendor name
:"PrimaTranZ"
;Supports Series 60 v 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
;Files to install
"..\..\..\epoc32\release\armv5\urel\PrimaTranZ.exe" -"!:\sys\bin\PrimaTranZ.exe"
"..\..\..\epoc32\data\z\resource\apps\PrimaTranZ.rsc" -"!:\resource\apps\PrimaTranZ.rsc"
"..\..\..\epoc32\data\z\resource\apps\PrimaTranZ_reg.mif" -"!:\resource\apps\PrimaTranZ_reg.mif"
"..\..\..\epoc32\data\z\private\10003a3f\apps\PrimaTranZ_reg.rsc" -"!:\private\10003a3f\import\apps\PrimaTranZ_reg.rsc"
"..\help\PrimaTranZ_0xecb6ce86.hlp" -"!:\resource\help\PrimaTranZ_0xecb6ce86.hlp"
"..\group\PrivacyStatement.txt" -"!:\private\ecb6ce86\PrivacyStatement.txt"
;Required for application to be covered by backup/restore facility
"backup_registration.xml" -"!:\private\ecb6ce86\backup_registration.xml"
By the way, I removed the resources that were causing trouble, and now I am getting CONE 14 error! Please help..
wizard_zu,
I did some debugging of my code, and discovered that my view resources in my rss file are not accepted by the emulator. The emulator gives CONE 14 error when the code reaches "ConstructFromResource(XYZ_VIEW). The view resource that is causing the trouble is copied below:
---------------------------------------------------
RESOURCE AVKON_VIEW r_primatranz_schedule_view
{
menubar = r_primatranz_schedule_menubar;
cba = R_AVKON_SOFTKEYS_SELECTION_LIST;
}
RESOURCE MENU_BAR r_primatranz_schedule_menubar
{
titles =
{
MENU_TITLE { menu_pane = r_primatranz_app_menu; txt = "App"; },
MENU_TITLE { menu_pane = r_primatranz_schedule_menu; txt = "View"; }
};
}
RESOURCE MENU_PANE r_primatranz_schedule_menu
{
items =
{
MENU_ITEM
{
command = EHelp;
txt = s_help;
},
MENU_ITEM
{
command = EAbout;
txt = s_about;
},
MENU_ITEM
{
command = EAknSoftkeyExit;
txt = s_exit;
}
};
}
------------------------------------------------------
is there anything wrong here?
I am going to start a new thread for this special request. Hope to find you there!