Thread overview | |||||
---|---|---|---|---|---|
|
July 08, 2010 Any special linking for _NSGetExecutablePath on OSX? | ||||
---|---|---|---|---|
| ||||
I need to use OSX's _NSGetExecutablePath, and I've declared it: extern(C) int _NSGetExecutablePath(char* buf, uint* bufsize); I don't have access to a OSX box to test it on ATM, so I need to know: Is there anything I need to tell the linker (like, anything special I need to explicitly link in) in order to get that to work, or should it "just work"? (ie, is whatever library is needed for that already linked by default?) |
July 09, 2010 Re: Any special linking for _NSGetExecutablePath on OSX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On Thu, 8 Jul 2010 19:24:52 -0400, Nick Sabalausky <a@a.a> wrote:
>
> I need to use OSX's _NSGetExecutablePath, and I've declared it:
>
> extern(C) int _NSGetExecutablePath(char* buf, uint* bufsize);
>
> I don't have access to a OSX box to test it on ATM, so I need to know: Is there anything I need to tell the linker (like, anything special I need to explicitly link in) in order to get that to work, or should it "just work"? (ie, is whatever library is needed for that already linked by default?)
I haven't used the function before, but after looking it up really quickly, that declaration looks good to go. Since it's part of the dynamic linker, I can't imagine that a library would have to be linked in for it to work.
|
July 09, 2010 Re: Any special linking for _NSGetExecutablePath on OSX? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On 2010-07-09 01.24, Nick Sabalausky wrote: > I need to use OSX's _NSGetExecutablePath, and I've declared it: > > extern(C) int _NSGetExecutablePath(char* buf, uint* bufsize); > > I don't have access to a OSX box to test it on ATM, so I need to know: Is > there anything I need to tell the linker (like, anything special I need to > explicitly link in) in order to get that to work, or should it "just work"? > (ie, is whatever library is needed for that already linked by default?) It's automatically linked. -- Jacob Carlborg |
Copyright © 1999-2021 by the D Language Foundation