Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
620 views
in Technique[技术] by (71.8m points)

c++ - Load 32-bit shared library from 64-bit application?

I have a shared library that is compiled as 32-bit. Can I use it from a 64-bit application or do I need to compile the shared library as 64-bit as well?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

No, you cannot load a 32-bit library in a 64-bit application through conventional means.

There are some clever hacks out there such as having a 32-bit application which loads the library and exports the functions through an IPC interface, but if you have the option to compile the library as 64-bit, then that is by far the best choice.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...