On Thu, Oct 13, 2005 at 05:23:42PM -0000, Troy Lokitz wrote: > For some reason, it is crashing when it tries to get an event. It > compiles ok (no coderes errors) but i can't get it to stop crashing.
It would help if you provided any errors you received when it crashed. > 1) does a section have to exist in only one header file for only one c > file? No. > 2) do all of the functions within the c file have to be part of the > same section? No. > 3) What are the rules for calling a function from one section (in one > c file) from another in a nother c file.... Basically, when you declare a function to be in another section, the caller prepares the jump differently then if it thought it was in the same section (i.e., the generated assemler code will be different). So, if the caller's code isn't aware that the function is in a different section, then the compiler isn't going to generate the correct code. The best way to ensure that the compiler knows what section each function is in is: A) Put all of the function declarations in one place and #include that in each .c file. B) Add -Werror-implicit-function-declaration to your compilation flags. This way the compiler will refuse to compile any code that makes function call if the function hasn't been previously declared. If you follow those two basic guidelines then you'll never have your function calls jumping into the wrong section. -- Dave Carrigan Seattle, WA, USA [EMAIL PROTECTED] | http://www.rudedog.org/ UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL-Postfix -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
