I can't see any problems with it right off, but your description of the error was pretty vague. If you could include the actual text of the error message (esp. line numbers), that would help. A problem that it looks like you haven't seen yet but will is that chars.c needs to include any relevant .h files as well, or you will get errors when trying to call any PalmOS function, and when trying to refer to any of your resources that are defined in Test_res.h. (Maybe this is your problem, and I just misunderstood your description of the error).
-Thomee Wright- "Andrew Lathrop" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Im trying to split my larger program into several modules. I know you need > to make the header file, and then include the header in both the main c file > and the file you made the header for. I can't get mine to quite work out > right. I have tried changing the declarations in the header to extern, > removing the identifiers, and other things i cna think of, but i still get > errors. I enclosed the header file, as well as the c file. The way it > currently is, i get error messages looking for a ) in the declarations in > the header after the identifier, and that it is looking for an identifer > after the closing ) that already is there. Any advice is greatly > appreciated. Thanks > Andrew > > (HEADER FILE) > #ifndef CHARS_H > #define CHARS_H > ///// > // chars.h > ///// > > void send_char( Byte p ); > Byte recv_char(); > > #endif > > (C FILE) > ///// > // chars.c > ///// > > #include "chars.h" > > // void send_char( Byte p ); > // Byte recv_char( ); > > void send_char( Byte p ) > { > Err e; > > SerSend(SerialRefNum, &p, 1, &e ); > if( e ) > FrmCustomAlert( ErrorAlert, "Error", "", "" ); > } > > Byte recv_char( ) > { > Err e; > Byte f; > > SerReceive(SerialRefNum,&f,1,0,&e); > if( e ) > FrmCustomAlert( ErrorAlert, "Error", "", "" ); > > return( f ); > } > > (MAIN.C) > #include <Pilot.h> > #include <Graffiti.h> > #include <SysEvtMgr.h> > #include <SerialMgr.h> > #include "Test_res.h" > #include "chars.h" > ... > > > > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
