dll eqivilant???
Hi,
I know that linux has shared libraries, but what i want is dynamic libraries that are executed at run-time not when i compile and to my understanding shared libs are done when compiling. Is there any way under linux that is the same as dll is under windows that gets executed at runtime without using a windows emulator.
thanks
Well, that depends on what you mean by "executed". When you "execute" a program, you run the code in it. I''m sure you don''t mean that Windows DLLs are run at compile time; that makes zero sense.
If you mean whether they''re resolved at compile or runtime, meaning the program finds them and decides which one to use when the program is done, both Windows and Unix dynamic libraries work like that. The two are not very different, at least in overall functionality.
Don''t listen to me. I''ve had too much coffee.
If you mean whether they''re resolved at compile or runtime, meaning the program finds them and decides which one to use when the program is done, both Windows and Unix dynamic libraries work like that. The two are not very different, at least in overall functionality.
Don''t listen to me. I''ve had too much coffee.
i think, the functions you're looking for, are :
dlopen, dlclose, dlsym, ... just read their man.
how to create such a dynamic linked library, you can read here.
(search the page for the word 'dynamically'... first one should bring you to the right place...)
or maybe in the mans of gcc & ld.
didn't try it, yet... but it should work.
hope, this helps...
[edited by - uNiQue0815 on September 6, 2002 6:24:50 AM]
dlopen, dlclose, dlsym, ... just read their man.
how to create such a dynamic linked library, you can read here.
(search the page for the word 'dynamically'... first one should bring you to the right place...)
or maybe in the mans of gcc & ld.
didn't try it, yet... but it should work.
hope, this helps...
[edited by - uNiQue0815 on September 6, 2002 6:24:50 AM]
Watch out. You''ll get compatability issues doing this if you
want your code to be portable to *nix, not just linux.
I believe solaris and hpux both have different dl models to
linux. There is possibly more variation as well. Just be aware
of it.
want your code to be portable to *nix, not just linux.
I believe solaris and hpux both have different dl models to
linux. There is possibly more variation as well. Just be aware
of it.
HPUX uses shl_load, shl_findsym, shl_unload among other shl_ functions.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement