- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I am a Ph.D student and trying to incorporate an already available Newton-Raphson solver into my code. When I try to run the solver with its subroutines and functions included in the main program file, there is no problem. However, when I separate the subroutines and functions into a module, I receive a LNK2019 + LNK1120 error. I attached the separated files. I'm stumped and have no idea how to solve this. I very much appreciate your help.
I am running Visual Studio 2017 + XE2018 Update 4 on a Win 10 computer.
Thank you very much in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Module procedure (i.e., subroutine and function) bodies should end with "END SUBROUTINE" or "END FUNCTION", as appropriate, rather than just "END".
Since FMIN is a module function, its type is known throughout the module. Any re-declaration of the type of FMIN (such as REAL or EXTERNAL) is going to supersede that type and create a reference to an external name, and at link time that external procedure will be missing. Simply remove all the superfluous type declarations.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page