Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Feb 2000 13:58:54 +0200 (EET)
From:      Victor Ivanov <v0rbiz@ab-bg.net>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Loadable Code Modules?
Message-ID:  <Pine.BSF.4.21.0002141354470.3944-100000@bissy.ab-bg.net>
In-Reply-To: <003901bf76c1$302107e0$0300000a@katana>

next in thread | previous in thread | raw e-mail | index | archive | help
dlopen(3):
  #include <dlfcn.h>
 
  void *dlopen(const char *path, int mode);
  void *dlsym(void *handle, const char *symbol);
  ...

  void *dll_handle;
  char (*my_func)(char *); // me too :)

  dll_handle = dlopen("/my/tests/something.so", RTLD_NOW);
  my_func = dlsym(dll_handle, "my_func");

  ...
  something.so should be compiled with the -shared option:
  cc -shared -o something.so something.c




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0002141354470.3944-100000>