News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

__POCC__OLDNAMES

Started by andi.martin, December 13, 2005, 10:33:29 PM

Previous topic - Next topic

andi.martin

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

Pelle

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
/Pelle

andi.martin

Thanks for the hint. Did not remember that stricmp is not standard C :-(

BTW: Very good work (PellesC)!

andi.martin

Is there a way to put compiler switches in the source, as like as there is for the linker?

Regards,
Andreas

Pelle

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
/Pelle

andi.martin

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