?
Solved

How to have multiple definitions of a subroutine in Intel Fortran

Posted on 2011-02-14
2
Medium Priority
?
823 Views
Last Modified: 2012-05-11

How can I use a static library in a Intel Fortran Project and at the same time, include some of the library subroutines in other parts of the project with some changes? In other words, in the case that I have two definitions of the same subroutine, How can I ask the program to use the subroutine that is included in the project rather than the same subroutine in the library?
0
Comment
Question by:sn1fflez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
omegaomega earned 2000 total points
ID: 34894085
Hello, sn1fflez,

You may find better response if you post your question in an Intel Fortran forum.  For example: http://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/

But if you are using something like:

    !DEC$ ATTRIBUTES DLLIMPORT:: RoutineName

to indicate that the routine should come from an external library, then omitting that line should allow the local version of the routine will be used.  (But the concept of having multiple routines of the same name is liable to be confusing to the poor maintenance programmer who follows you.  I would think carefully if there isn't a better way to do what you want, and if you do proceed, document what you are doing very explicitly.)

Cheers,
Randy
0
 
LVL 5

Expert Comment

by:dcesari
ID: 34894653
Possibly the one which is going to be used is be the one that appears first (either as object file or as static library) on the linker commnad line, provided that the linker does not complain, but I fully agree with the previous comment that this is a dangerous practise.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question