By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,077 Members | 2,160 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,077 IT Pros & Developers. It's quick & easy.

linking to a .so object's functions?

P: n/a
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
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Gernot Frisch wrote:
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
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.