Author Topic: Build error on OS X 10.7.5, XCode 4  (Read 3469 times)

ssteinerX

  • Guest
Re: Build error on OS X 10.7.5, XCode 4
« Reply #25 on: 10 January 2013, 07:58:37 »
Apparently I'm not the only one who is confused:

http://stackoverflow.com/questions/13607129/c-cant-find-non-standard-c-functions-in-global-namespace

In C++, it's officially <cstring>, not <string.h>. – ipc Nov 28 '12 at 14:24
2    
You can use either and they differ in whether the functions appear in the global namespace and only maybe in std or whether they appear in std and only maybe in the global namespace. It doesn't make a difference there, though. At least that's how I understood it. – Joey Nov 28 '12 at 14:24

Poking around until I can sleep...feel free to do the correct thing and ping me on IRC.

S

ssteinerX

  • Guest
Re: Build error on OS X 10.7.5, XCode 4
« Reply #26 on: 10 January 2013, 08:15:36 »
http://stackoverflow.com/questions/13607129/c-cant-find-non-standard-c-functions-in-global-namespace

There's no definitive answer there, but is strdup deprecated and _strdup is the new one?  Seems pretty stupid (and maybe Microsoft only), but there's an implication that strdup is POSIX not "standard C++" whatever the heck that means.

I'm beginning to remember -- this cross-compiler silliness is one of the things that drove me to Python so many years ago...

S

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Build error on OS X 10.7.5, XCode 4
« Reply #27 on: 10 January 2013, 08:17:03 »
No need for namespace strdup is a C function (not c++) so it certainly should suffice to just include string.h

ssteinerX

  • Guest
Re: Build error on OS X 10.7.5, XCode 4
« Reply #28 on: 10 January 2013, 08:50:39 »
I'm about to crash, but apparently there are several levels of compliance with various standards available with the OS X/Darwin compiler.

It may be as simple as -D SOME_IDIOTIC_VERSION_COMPATIBILITY_THING when compiling on OS X but I'm far out of my current knowledge zone here.

Maybe welltall(And) knows?

I know he hates the current OS X toolchain, but it is what it is...unless I can get specific instructions/clues as to what to replace/add, that's what I've got...

S

 

anything