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 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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?

Steve - Intel Developer Support

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.



Fichiers joints: 

Fichier attachéTaille
Télécharger gdfMD.log10.85 Ko
Télécharger BuildLog_gdfMD.txt11.2 Ko

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.

Steve - Intel Developer Support

Connectez-vous pour laisser un commentaire.