Does Static Library need to export functions?

Does Static Library need to export functions?

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


5 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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?


I have attached log files for both projects.  The C dll project does not build successfully, so the log file for it is a text file.




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?



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.


Melden Sie sich an, um einen Kommentar zu hinterlassen.