Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to have multiple definitions of a subroutine in Intel Fortran

Posted on 2011-02-14
2
Medium Priority
?
829 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 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