On Mon, 20 Jan 2003, Dave Mottorn wrote:

> There must be something I'm missing that tells the compiler to look in
> the original source file for globals and prototypes referenced in the
> new source code file. I'd appreciate any help anyone can give me.

Yep, it's called "extern".  Put that keyword in front of the variable
definitions in the 2nd source code file.  It tells the compiler that the
variables exist, but the true definitions are in another source code file.

To simplify things in the future, you can put these "extern" variable
definitions in header files and just include those where you need those
variables.  A lot easier than copying them everywhere :-)

-- 
-----------------------------------------------------------------------
Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/
Software Developer  //  Gamer  //   Webmaster  //  System Administrator
Friends don't let friends wear Speedos.  Ever.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to