Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Conflicting names in libraries

Intel_C_Intel
Employee
417 Views
Hi,

I want to create a code that pulls in functions from two separate libraries. The link process failed because of conflicting routine names in the libraries. Is there a way to package my code to avoid the conflict and without re-naming the routines?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
417 Views
I wouldn't think this would be an issue unless something else you pulled in from one library referenced the "bad" routine in the same library. Perhaps you can use the Linker settings option to name the libraries in order, rather than adding them to your project, to control the order of reference.

Steve
0 Kudos
Intel_C_Intel
Employee
417 Views
Thanks Steve. Problem is that I need to control the correct copy of routine for the linker to use as it always gets it from one library only. Take the following example:

Library LIB_A contains the object files of routines A and C, and A calls C. Similarly, library LIB_B also contains 2 objects B and C, and B calls C but here C is different from the one in LIB_A.

Given these 2 libraries, how can I ensure that A calls the C in LIB_A and B calls the one in LIB_B? I have thought of using modules but cannot make it work.
0 Kudos
Reply