- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm currently developing in the Microsoft Visual Studio .NET 2003 environment. I have this C application that calls a Fortran static library.When I goto compile the Fortran library, I get no errors and it creates .lib file. So when I goto compile and link the C program with the Fortran......to seems like it has troublelinking in the my Fortran library.
it generates a unresolved external symbol error LNK2019: _for_emit_diagnostic
That error seems to be a internal function that it is complaining about that I am not familiar with...... I'm thinking that it has to be some kind of switch or setting that I'm need to turn on or off in my properties setting in my project. I my properties settings for my C program I have the __cdecl(/Gd) "Calling Convention" set.
Any help would be deeply appreciated.......
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not familiar with the internals of Intel Fortran. This being said, what this looks like is _for_emit_diagnostic is part of the Fortran Runtime Library. Your application is linking with the C Runtime Library (as it should). Perhaps you have a diagnostic switch set on the Fortran compiler (e.g. check for array subscrips out of range or un-initialized variable check). If incompatible option then you will either a) have to compile the Fortran code without this option, or b) locate the fortran library that contains _for_emit_diagnostic and include that in your link (then include anything that come in as a requirement of _for_emit_diagnostic, ...)
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim,
Thanks for the info, I set the "check array and string bound" switch to no in my fortran project settings.... and that solved the problem with the _for_emit_diagnostic unresolved external, but now I have another unresolved external. Its complaining about my "GETENV" function that I call in myFortran library when my C program goes to link.I have the "USE IFPORT" statement in my fortran code for the "GETENV" function..... Am I missing here?
Thanks,
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tim,
thanks for the info..... Before I mademy previouspost, I looked in the IVF help about IFPORT and its associated it with "ifport.lib"....so I lookedin the Fortron lib directory for it and noticed that it was not there...to busy concentrating on"ifport.lib"....I did not bother to look for "libifport.lib".....so that's when I decided to make the post.....Ihave to try this first thingnext week.....
Have a good fourth......
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. In the Fortran project, go to the Libraries property page and set the property Disable Default Library Search Rules to "No".
2. In Tools..Options.. Projects.. VC++ Directories, add the path to the Intel Fortran IA32LIB folder to the list for Library files.
Rebuild the solution.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page