troubleshooting Question

Can I have two identical entry points in different Dynamically linked libraries?

Avatar of klopter
klopter asked on
Programming Languages-OtherC++
5 Comments1 Solution271 ViewsLast Modified:
I want to call a code that uses 32-bit integers (and hence calls libraries compiled for 32-bit integers) from within an application that works primarily with 64-bit integers (and hence calls libraries compiled for 64-bit integers).

I want my 32-bit codes to call 32-bit library routines and my 64-bit codes to call 64-bit library routines.

I would like something like
g++ -shared --export-dynamic -o c32bit.o /usr/lib/libc-32.a ...
g++ -shared --export-dynamic -o c64bit.o /usr/lib/libc-64.a ...
g++ -o a.out main_routine_calls_c32bit_and_c64bit.o

It there any chance that I can make this work?  Or am I out of my mind?  I realize that the two libc.a libraries will have multiple identical entry points.  I just hope that somehow these could be resolved when the .so files are created.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros