On 23-Oct-2008, John Swensen wrote:
| Attached is a patch to give more information when it fails to load
on
| OSX. FYI, as of OSX 10.5 dlopen is the preferred method and all
these
| NS* functions are deprecated.
|
| John Swensen
|
| - (*current_liboctave_error_handler)
| - ("couldn't link module %s", file.c_str ());
| + NSLinkEditErrors ler;
| + int lerno;
| + const char *file2;
| + const char *errstr = NULL;
| + NSLinkEditError (&ler, &lerno, &file2, &errstr);
| + if (errstr)
| + {
| + (*current_liboctave_error_handler)
| + ("couldn't link module %s because of error condition:\n%s",
file.c_str (), errstr);
Does NSLinkEditError allocate memory for file2 and errstr, or are they
set to point to static arrays? If it is allocated, do we need to free
it, or is it managed entirely by the NSLinkEditError function?
jwe