NO

Author Topic: __POCC__OLDNAMES  (Read 3947 times)

andi.martin

  • Guest
__POCC__OLDNAMES
« 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

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2038
    • http://www.smorgasbordet.com
__POCC__OLDNAMES
« Reply #1 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
/Pelle

andi.martin

  • Guest
__POCC__OLDNAMES
« Reply #2 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)!

andi.martin

  • Guest
__POCC__OLDNAMES
« Reply #3 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

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2038
    • http://www.smorgasbordet.com
__POCC__OLDNAMES
« Reply #4 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
/Pelle

andi.martin

  • Guest
__POCC__OLDNAMES
« Reply #5 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