dynamically
hello:
I create a libmydll.so file,and now I want to invoke it.But I do not use "dlopen()" to invoke it. How to invoke ? thanks |
Make sure the directory your .so file is stored is listed in /etc/ld.so.conf. Then (as root) run "ldconfig" and try again.
|
hello
I try it ,but not success ??? |
Try following all steps:
1. Compile/link source/object files of your shared library with -fpic, -shared, -Wl,-soname age.c Code:
/* one simple function */ This gives libage.so, a shared lib. 2. Compile/link your application source with -L and -l myage.c Code:
#include <stdio.h> This gives myage exe file, dynamically linked to libage.so in *current directory*. 3. Run it with LD_LIBRARY_PATH (if libage.so is not going to be in one of listed folders in your /etc/ld.so.conf) linux/tmp$ LD_LIBRARY_PATH=. ./myage My age is 25. |
hello,
I try ,but not success .why??? |
why
everyone why not success in my comuter>>>>> |
All times are GMT -5. The time now is 03:26 AM. |