Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Making DLLEXPORT functions visible from C++ DLL

$
0
0

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_();

 

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>