[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Problems to load a C++ tux module (patch)



Hi,

I'm sorry that I have to respond to my own question, but I solved the 
problem. I did not provide all necessary libs.

However, I would have easier found the problem, if tux would be a bit more 
verbose when "dlopen"ing the module. I have attached a patch which prints the 
error message from dlerror() in case of an error.

The patch is against tux-2.0.21 and should not break anything since it's a 
nearly trivial patch.

Bye, Marcus

-- 
Marcus Gruendler
eMail: runner@tamalin.de
WWW: http://www.tamalin.de/runner/index_en.html

--- tux-2.0.21/tux.c	Mon Mar 12 16:17:29 2001
+++ tux-2.0.21-dlopen/tux.c	Tue Mar 27 15:36:11 2001
@@ -446,12 +446,12 @@
 			printf ("handle: %p\n", handle);
 			if (!handle) {
 				tux_stop_date_timer(timer);
-				die(1, "%s: dlopen() handle missing", strerror(saved_errno));
+				die(1, "%s: dlopen() handle missing (%s)", strerror(saved_errno), dlerror());
 			}
 			mod_handle_events = dlsym(handle, "TUXAPI_handle_events");
 			if (!mod_handle_events) {
 				tux_stop_date_timer(timer);
-				die(1, "%s: TUXAPI_handle_events() function missing", strerror(errno));
+				die(1, "%s: TUXAPI_handle_events() function missing (%s)", strerror(errno), dlerror());
 			}
 			mod_init = dlsym(handle, "TUXAPI_init");
 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []