- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm building a C++ DLL that links some Fortran static libraries. My environment is
Visual Studio 2012
Intel(R) Visual Fortran Compiler XE 13.1.1.171
Fortran libraries export some functions e.g.
logical function example_function() !DEC$ ATTRIBUTES DLLEXPORT :: example_function example_function = .true. return end
When I build my C++ dll example_function does _NOT_ show up in the exports. If I add a call to this function from DllMain I get the symbol exported. What is the proper way to export Fortran functions in this configuration?
extern "C" SSSPM_EXPORT bool C_FORT_CONV example_function_(); BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { example_function_();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If it's in a library, it won't get linked in unless there's a reference. You can add the function name to Linker > Input > Force Symbol References. Maker sure it is spelled with the correct case and decoration.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If it's in a library, it won't get linked in unless there's a reference. You can add the function name to Linker > Input > Force Symbol References. Maker sure it is spelled with the correct case and decoration.

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