Print out error message when symbol lookup fails.
diff --git a/libacc/tests/main.cpp b/libacc/tests/main.cpp
index e4e386f..948f4cb 100644
--- a/libacc/tests/main.cpp
+++ b/libacc/tests/main.cpp
@@ -38,7 +38,14 @@
 }
 
 ACCvoid* symbolLookup(ACCvoid* pContext, const ACCchar* name) {
-    return (ACCvoid*) dlsym(RTLD_DEFAULT, name);
+    // Call dlerror once to clear out any preexisting error condition.
+    (void) dlerror();
+    ACCvoid* result = (ACCvoid*) dlsym(RTLD_DEFAULT, name);
+    const char* error = dlerror();
+    if (error) {
+        fprintf(stderr, "%s\"%s\"\n", error, name);
+    }
+    return result;
 }
 
 #ifdef PROVIDE_ARM_DISASSEMBLY