linking to a .so object's functions?

G

Gernot Frisch

Hi,

I have the source for a .so object. Now, I don't want to use dlopen,
but statically link to that object. How can this be done?
Is there something like __dllimport on VC++ compilers?

Thank you very much,

--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
 
V

Victor Bazarov

Gernot said:
I have the source for a .so object. Now, I don't want to use dlopen,
but statically link to that object. How can this be done?

Add it to the list of libraries at link time.
Is there something like __dllimport on VC++ compilers?

You would have to ask in a newsgroup dedicated to your compiler. There
is nothing in the C++ _language_ that relates to dynamic linking of
libraries. IIRC, you don't really need __dllimport (or its analogues)
on UNIX.

Also, this is all OS-specific. Please consider asking in the OS newsgroup
next time. Thanks.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top