Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28465 ディスカッション

Calling 64bit Intel Fortran DLL in 32bit c++ application

Hyungjun_K_
ビギナー
491件の閲覧回数

Environment :

Intel® Parallel Studio XE 2018 Update 5 Composer Edition for Fortran Windows* Integration for Microsoft Visual Studio* 2015, Version 18.0.0044.14
Microsoft Visual C++ 2015

 

I have FORTRAN DLL which have to compile to 64bit and this will be used in 32bit c++ project.

I attached sample of FORTRAN DLL as ForanDLLTest.zip and c++ project as cppFortran.zip.

When FORTRAN DLL is compiled to 32bit, there are no problem to use DLL in cpp project.

But when FORTRAN library is compiled to 64bit, LNK2019 error occurs in cpp project.

How can I resolve this..?

0 件の賞賛
2 返答(返信)
FortranFan
名誉コントリビューター II
491件の閲覧回数

@Hyungjun K.,

This is not a Fortran or an Intel Fortran compiler product matter, you need to look at your device operating system (OS) side of things for this, see what the OS vendor (Microsoft) informs you in terms of what is supported e.g., "Process Interoperability" https://docs.microsoft.com/en-us/windows/win32/winprog64/process-interoperability where it says, "a 32-bit process cannot load a 64-bit DLL"

Steve_Lionel
名誉コントリビューター III
491件の閲覧回数

You cannot mix 32-bit and 64-bit code in an application.

返信