Summary of problems solved during Symbian Development (continuously updating)

Source: Internet
Author: User
Tags codewarrior

1. A menu item is added to the resource file. HRH.. RSS and handlecommandl are modified accordingly, but these two errors always occur during running:

Vrex fatal error u1077: "Perl": return code "0x1"
Vrex error prj0019: tool from "Building Resources from vrex_caption.rss"

Add msobj71.dll to the ../vc7/bin directory (this file exists in the ../common/ide directory)

Environment variable settings: (for reference, this is only the path for installing the relevant development software on our machine. Please modify it based on your own implementations)

Path

C:/program files/common files/Symbian/tools; C:/program files/PC Connectivity Solution/; C:/perl/bin/; C:/Windows/system32; c:/windows; C:/Windows/system32/WBEM; C:/program files/Java/jdk1.5.0 _ 11/bin; C:/program files/Microsoft Visual Studio. NET 2003/vc7/bin; C:/program files/Nokia/codewarrior for Symbian v3.1/bin; C:/program files/Nokia/codewarrior for Symbian v3.1/symbian_tools/command_line_tools

Classpath

D:/tools/Java/jdk1.5.0 _ 11/lib

Epocroot

/Symbian/8.0a/s60_2nd_fp2_ SC/

 

2. depressing: The system prompts "shell error lnk2019: the external symbol that cannot be parsed" public: _ thiscall cameraserver. setlightingconditions (rcameraserv: elightingnormal); In the function "public: void _ thiscall ccameramanager: constructl (class trect const &) "(constructl @ ccameramanager @ qaexabvtrect @ Z) referenced" quasi-error. added

Library cameraserver. lib can be compiled in cmd, but the above error is prompted in vc7.

Later, I introduced a library file to solve this problem. In the project resource manager, right-click the project and choose Properties> Configuration Properties> linker> command line, in the additional options on the right, enter cameraserver. lib.

Cause: however, sometimes adding database files directly to the MMP Ms does not take effect.

3. depressing "C:/Symbian/Shell/src/shellappui. CPP (457): Error c2664: "caknviewappui: addviewl": the parameter 1 cannot be converted from "chelpview *" to "caknview *". This problem puzzles me for one night, originally helpview. h does not inherit caknview.

Solution: Class chelpview: Public ccoecontrol, meiklistboxobserver,Caknview

4. Not solved yet

Error c2243: "type conversion": the conversion from "chelpview *" to "caknview *" exists, but cannot be accessed"

5. depressed. I am confused for a day. I am still very happy. I finally solved the problem. I will learn more and accumulate experience in the future.

Error: eikctl 42. Generally, no error or interruption is prompted. Only "the program is closed" is displayed ".

Therefore, it is difficult to find out where errors occur, and only enhance programming ideas.

I checked some related information on the Internet and consulted the tech Q group's heroes. I learned that:

1. Invalid resource handle, such as bitmap, appears when drawing the draw () control.

2. Check whether the correct pointer is returned by the componentcontrol function.

3. Does the countcomponentcontrols function return the correct number of controls?

Check the relevant code carefully:

// Ihelplistbox = new (eleave) caknsinglegraphicstylelistbox;

Application:
Ihelplistbox = new (eleave) caknsinglestylelistbox;

Because I use ListBox without icons.

 

6. Differences on coding requirement from winscw udeb emulator
And armi urel real handset Compilation:

(1). // This works in emulator (winscw udeb)
// This fails in armi urel
Switch (selection)
{
Case EOne:
Dosomething ();
Break;
}

// This works in both emulator and armi urel
Switch (selection)
{
Case EOne:
{
Dosomething ();
Break;
}
}

(2). It is found that the string passed in (tdesc) in the send message cannot be displayed on the mobile phone.

Fixed, used
Method 1: (working in handset)
Tbuf <kw.len> kusername;
Kusername. append (_ L ("supersoar "));
Msgregister (kusername, true, sendbuf );

Replace
Method 2:
_ Resolve (kusername, "supersoar ");
Msgregister (tdesc) kusername, true, sendbuf );

In method 2 above, kusername is okay in the simulator and cannot be properly displayed on the mobile phone
If you use method 1 and then use armi compile, there will be no original warning.
(Credit: supersoar)

7. Error prj0019: the tool starts from "A pre-generated event is being executed ..."

In vs 2003, you can select "generate" in the "output" window to view more detailed error information.

8. Notes for Symbian development:

1: when calling a function that may exit abnormally, consider what problems will occur if the program exits, and clear the API function if necessary.
2: any function that may exit abnormally should end with L.
3: Use (eleave) to instantiate an object. But remember, these codes will also exit unexpectedly.
4: always declare only one heap class as a pointer, create a heap class through new, and never declare or instantiate the heap class as an automatic variable.
5: If you call a function ending with LC, the pointer returned by the function must pop up from the cleaning stack. Otherwise, the program will crash when the function is called to exit.
6. Only the cleanupstack: pushl () method is used for cbase objects, simple buffers, and objects without destructor.
7: When writing a DLL, in the. h file, place import_c before each function declaration for the functions that you want to use as the DLL user, and place export_c before the implementation of each function.
8: Do not use writable global data in the DLL. Any external global variable must be of the const type. The simulator build may be successful, but an error is reported when it is built on a mobile phone.
9: You can use writable global data in the EXE file.
10: Follow the naming standards of member variables, parameters, enumeration types, constants, and macros.
11: When you create an object that is instantiated in the heap, It is derived from the cbase class and prefix C is added before the class name.
12: when using the Symbian OS API, package the header file specified in the SDK document and import the file to the database.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.