- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have a Fortran code and I use Visual Studio 2005 to run it.
Until today, it was working fine. I made some basicmodifications and now I have this two errors:
Error1 error LNK2019: unresolved external symbol _E referenced in function _MAIN__Modelos Lineales
Error2 fatal error LNK1120: 1 unresolved externalsModelos Lineales
I don't know what is the problem, please help me.
thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
X = E(3)
where you intend E to be an array but it is not declared as one, so the compiler thinks it's an external function. If this is the case, you need to declare E as an array. Sometimes, if you are using fixed-form source (.f or .for file type) and you add characters to a declaration, you can push things past column 72 and this can create puzzling errors.
Try adding IMPLICIT NONE or compile with /warn:decl and see if that shows you the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, Steve.
My program it's working now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
I am using Visual Studio 2008. I am getting similar errors after building my fortran code as camiel-
1>cjw.obj : error LNK2019: unresolved external symbol _UPSTRM referenced in function _MAIN__
1>Debug\cjwave.exe : fatal error LNK1120: 1 unresolved externals
In your last post, you suggested camiel to " compile with /warn:decl". Could you please tell how to implement that in VS 2008; Camiel was using VS 2005.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right click on the project and select Properties. Go to Fortran > Diagnostics. Under Language Usage Warnings, set "Warn for Undeclared Symbols" to Yes.
This may result in many compile-time errors if you rely on implicit declarations. It also won't help if you CALL UPSTRM. I suggest you search your source to see what UPSTRM is supposed to be, and where it is used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks steve.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page