- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have inherited a VS 2005 solution which contains a C dll project and a Fortran static library project. The C dll project requires the Fortran routines. I have updated the solution for VS2010.
The C dll project has the Fortran library added as an Additional Dependency. I have also added the Fortran library to C dll project.
However, the C project build show unresolved symbols for each of the Fortran routines.
If I add !DEC$ ATTRIBUTES DLLEXPORT to the Fortran routines, then I get no complaints.
Do I really need to export the routines from a static library, or have I missing something?
Regards, Mike
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess is that your description doesn't quite match what you actually have. DLLEXPORT is only needed if you are linking against a DLL. If the Fortran project really is a static library, that wouldn't be needed.
Can you attach a ZIP of the buildlog.htm from the Fortran project and the build log from the C project?
- 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
I just had a thought. Could it be that C is looking for lowercase function names, but the static library lists them with uppercase? If so, is there a option to write the symbol names in lowercase?
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, case matters. Also, I see you are using STDCALL, which Intel Fortran doesn't use by default. Is that deliberate? I don't see the Fortran library build log.
![](/skins/images/71A9511A625CE5D5D45FB59952A4AA71/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page