RE: Finding out executable location from a c program

  • > -----Original Message-----
    > From: Alastair Houghton [mailto:<alastair...>]
    >> Ok, I see your point - when in Rome, do as the Romans do. = )
    > :-)  Yeah, sort of.

      Sorry, I was overly brief - I meant that as two separate things, i.e.
    I get your point and that as I am somewhat of a stranger here (in os-x
    programming, that is), I should do as the natives here do as they
    probably have a good reason for doing things a certain way.

    > I think my point was really that *not* trying to
    > find the executable path was an easier, safer and more portable
    > solution, and that there aren't really any disadvantages worth
    > mentioning

      Easier - definitely.

      Safer - ok, you've convinced me on this one. Thanks for that.

      More portable - between *nixes, yes, but in e.g. windows a hard coded
    path is rare - usually the installers let you choose where you want to
    install. On windows reading the location based on a registry entry might
    be more "native".

      Anyway, thanks for your input. I think I'll change the source so that
    according to a define given at compile time the executable will use
    either a "well known location" or lookup based on the executable
    location (as it's already implemented).
      But certainly you've convinced me that if (hopefully when) someone
    makes a package, it will contain the version w/ hard coded path.

previous month december 2007 next month
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today