Pelles C forum

Pelles C => Feature requests => Topic started by: andi.martin on December 13, 2005, 10:33:29 PM

Title: __POCC__OLDNAMES
Post by: andi.martin on December 13, 2005, 10:33:29 PM
I have a windows project which uses stdlib too (stricmp, ltoa).
I have to head "#define __POCC__OLDNAMES" before the include directive.
What about linking oldnames.lib automatically, when the corresponding name had been defined?
Another pragma "#pragma lib "oldnames.lib" is currently necessary.

Regards,
Andreas
Title: __POCC__OLDNAMES
Post by: Pelle on December 13, 2005, 11:14:12 PM
What about using the correct compiler option /Go (or check "Define compatibility names" in IDE Project options) - it will define __POCC__OLDNAMES and include oldnames.lib... ;-)

Pelle
Title: __POCC__OLDNAMES
Post by: andi.martin on December 14, 2005, 12:10:46 PM
Thanks for the hint. Did not remember that stricmp is not standard C :-(

BTW: Very good work (PellesC)!
Title: __POCC__OLDNAMES
Post by: andi.martin on December 14, 2005, 12:15:10 PM
Is there a way to put compiler switches in the source, as like as there is for the linker?

Regards,
Andreas
Title: __POCC__OLDNAMES
Post by: Pelle on December 14, 2005, 06:47:54 PM
Thanks. No, you can't (generally speaking) change compiler options from the source code. At least some options can only be valid for the entire file, and #pragma's can be put anywhere in a file. Embedding options in a comment is just too ugly...

Pelle
Title: __POCC__OLDNAMES
Post by: andi.martin on December 14, 2005, 08:14:08 PM
Yes, you're surely right. I believe I didn't spent enought time in considering my question...
For my goal the two pragmas are good enough.

Thanks