I have the following code that works (identbrl is not NULL and it works ok when called) :
identbrl = lt_dlsym(library, "identbrl"); however if I add the following code : identbrl = lt_dlsym(library, "identbrl"); strerror = lt_dlerror(); if (strerror) { Log(LOG_ERR, "%s", strerror); return 0; } I get an "unknown error" message. So lt_dlerror must be returning non-NULL while there is no error. But its documentation says : Function: {const char *}lt_dlerror (void) Return a human readable string describing the most recent error that occurred from any of libltdl's functions. Return NULL if no errors have occurred since initialization or since it was last called. I used lt_dlerror instead of checking if lt_dlsym returns a NULL value because of a comment in the autobook : http://sources.redhat.com/autobook/autobook/autobook_169.html#SEC169 run = (entrypoint *) lt_dlsym (module, "run"); /* In principle, run might legitimately be NULL, so I don't use run == NULL as an error indicator in general. */ errormsg = dlerrordup (errormsg); if (errormsg != NULL) { errors = lt_dlclose (module); module = NULL; } So how am I supposed to check if there is an error with lt_dlsym()? by checking if lt_dlsym() is non-NULL or by checking if lt_dlerror() is non-NULL or something else? identbrl = lt_dlsym(library, "identbrl"); if (!identbrl) { strerror = lt_dlerror(); Log(LOG_ERR, "Driver symbol not found identbrl : %s", strerror); return 0; } thanks in advance -- Sébastien Sablé <[EMAIL PROTECTED]> http://inova.snv.jussieu.fr/~sable/ _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool