Same subroutine in different library

Hi,
I have a weird question:

I have a Fortran subroutine that I will use it in a root macro. In the macro, I have to load its compiled shared lib, for example,

gSystem->Load(“mylib1”);

However, I have to change a parameter to re-compile the Fortran code again and build another lib that is also useful in my root macro. The problem is in the 2 versions of the lib, the subroutine name is same. My question is how I can use the subroutine with the same names in 2 versions of Fortran libs in my ROOT macro (similar idea like namespace in c++)? If this is not achievable, then I have to change subroutine names in Fortran code.

Thank you,
Zhiyi.

[quote] My question is how I can use the subroutine with the same names in 2 versions of Fortran libs in my ROOT macro (similar idea like namespace in c++)?[/quote]Fortran does not support namespace or anything equivalent, so you can not use both library at the same time.

Cheers,
Philippe.

Thanks for your reply.

How about this way:

I could write a class serving as a wraper. For 2 versions of the subroutine, I create 2 individual objects of the class. In each object, I only load the lib version needed. This makes sense?

Cheers,
Zhiyi.

[quote=“pcanal”][quote] My question is how I can use the subroutine with the same names in 2 versions of Fortran libs in my ROOT macro (similar idea like namespace in c++)?[/quote]Fortran does not support namespace or anything equivalent, so you can not use both library at the same time.

Cheers,
Philippe.[/quote]