At 02:34 AM 10/22/2004, Ralf Wildenhues wrote:

Hi All,

Ok, based on the recommendations from Ralf, I've been able to move forward some. I've got her compiling now and the only issue remaining is that the dlopen function is not finding the symbol I need it to look for, the new code looks like:

#include <dlfcn.h>
#include <stdlib.h>
#include <unistd.h>
#include <iostream>

void main(void) {
 void (*test_function) (int &);
 void *handle =  NULL;

 handle = dlopen("libtest/libtest.so", RTLD_NOW);
 if (!handle) {
  cerr << dlerror() << "\n";
  exit(EXIT_FAILURE);
 }

 test_function = (void (*)(int&))dlsym(handle, "test_fun");
 if (!test_function) {
   cerr << dlerror() << "\n";
   exit(EXIT_FAILURE);
 }

 test_function(1);

 dlclose(handle);
}

When I execute the command I get:

> ./test_call
Undefined symbol "test_fun"

Yet it's defined in the library and compiled in as far as I can tell..

Is there something I need in the library end of things? all it looks like right now is:

#include <iostream>

void test_fun(int &number) {
 cout << number << "\n";
}





_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to