Paul, This is as good a place as any because the interested parties are subscribed. Since Ben is probably sleeping off the effects of an all-night Freebirds veggie burrito bender, I'll step in.
CodeWarrior uses its' C compiler for files that end with a .c extension and the C++ compiler for files that end with .cpp (among others). If you have files with both extensions and you want to force all files to go through the C++ compiler and use C++ name mangling rules, go to the preference panel for the C++ compiler and turn on "Force C++ compilation". Otherwise, you will need to force C name mangling using 'extern "C"' on your C prototypes. -E > -----Original Message----- > From: Paul Johnson [mailto:[EMAIL PROTECTED] > Sent: Monday, August 04, 2003 9:13 AM > To: Palm Developer Forum > Subject: Re: Link Errors > > > I knew I shoulda waited before posting this on account of > "dumbass error: patient heal thy self" > > The master include file that other platforms include didn't > have the extern "C" crap around it. I have to build my > vanilla C project as CPP due to some iffy code in expat - an > xml parser I use. So, it was user error due to name-mangling, > but I'm boring you to death with it in case it helps anyone > in the future. > > I'm sure the linker could've helped me out with this though. > Hey ho...... > > > Regards, > Paul Johnson > Applewood House > www.applewoodhouse.com > > > ----- Original Message ----- > From: "Paul Johnson" <[EMAIL PROTECTED]> > To: "Palm Developer Forum" <[EMAIL PROTECTED]> > Sent: Monday, August 04, 2003 3:02 PM > Subject: Link Errors > > > > I've got a large project with 199 files in it that I'm > converting from > > PocketPC to Palm. I've finally gotten it to compile with no > errors but > > now it seems as though every single function is missing. > > > > I have 50 (the max it reports) link errors from the 1st source file > > and every one of them says function x is undefined. So, I go to my > > first > source > > file (main.c) select the first allegedly missing function, hit goto > > definition, et voila, theres my poxy function. If the > compiler knows > > where it is, how come the linker doesnt ? > > > > Oddly, all the missing files are part of what on all other > formats is > > a static library. I've munged it all in together for palm > though - no > > libraries are being made by me or included by me or > whatever. How does > > it know that all files starting with a PR_ prefix should be treated > > like leppers and not linked ? > > > > Is there anyway to get CW to tell me what the link error > actually is, > > as > the > > one its reporting "undefined" clearly isn't. The function > is perfectly > well > > defined thank you! > > > > Could this be a segmentation thing ? I've not started moving stuff > > around yet, but would at least expect "function is too far > away" type > > errors as opposed to undefined, so I'm not thinking this is > the root > > cause. > > > > Is there a CW mailing list where I should be asking this ? > > > > > > Regards, > > Paul Johnson > > Applewood House > > www.applewoodhouse.com > > > > > > -- > > For information on using the Palm Developer Forums, or to > unsubscribe, > please see http://www.palmos.com/dev/support/forums/ > > > > > -- > For information on using the Palm Developer Forums, or to > unsubscribe, please see http://www.palmos.com/dev/support/forums/ > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
