Intel complier for calling DLL and build Dll 
Author Message
 Intel complier for calling DLL and build Dll

Hi, there.

It looks like I have problems with the dll writen in fortran by using the
intel compiler for windows version 8.0. I am not sure if it is a bug of the
complier or not. In order to simplify the model. I am trying to port the
sample project provided by Compaq visual fortran named as LoadExp1. It seems
when the main program trying to getprocaddress, the call to the
getprocaddress failed. Are there anyone can give me a hand. I will send them
the sample project file if you try to help or the code can be find from
previous compaq fortran. under the directory of ..\Info\DF\Dll of the CD
installation disk or from the sample file directory if you've isntalled the
sample code. Any help will be appreciated.

Regards,

David



Sat, 23 Sep 2006 16:47:44 GMT  
 Intel complier for calling DLL and build Dll

Quote:

>It looks like I have problems with the dll writen in Fortran by using the
>intel compiler for windows version 8.0. I am not sure if it is a bug of the
>complier or not. In order to simplify the model. I am trying to port the
>sample project provided by Compaq visual fortran named as LoadExp1. It seems
>when the main program trying to getprocaddress, the call to the
>getprocaddress failed. Are there anyone can give me a hand. I will send them
>the sample project file if you try to help or the code can be find from
>previous compaq fortran. under the directory of ..\Info\DF\Dll of the CD
>installation disk or from the sample file directory if you've isntalled the
>sample code. Any help will be appreciated.

The problem is this: If you convert the project to an Intel Visual Fortran
project, so that the /iface:cvf option is added automatically (this is done to
enhance compatibility with CVF), the Intel compiler is exporting only one of
the two routine names of SUBA, and the LOADEXP1 program is expecting the one
not exported.

One way to fix this is to replace the ATTRIBUTES line in TESTSUB.F90 with:

!DEC$ ATTRIBUTES ALIAS:"SUBA", DLLEXPORT:: SUBA

Another is to set the Calling Convention property (under Fortran..External
Procedures) in the two projects to "Default".

By the way, did you know that Intel offers free support for Intel Visual
Fortran, and a free user forum? (Full support is free during evaluation and
for 12 months after buying a license with support. )

Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
  http://softwareforums.intel.com/
Intel Fortran Support
  http://developer.intel.com/software/products/support/



Sat, 23 Sep 2006 23:51:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Building DLLs with Compaq Visual Fortran and Intel Visual Fortran

2. How to setup a procedure in a DLL that calls a procedure in another DLL

3. Help on Net Express COBOL dll and calling the DLL from VB program

4. Mixed Language - DVF 6.0 DLL calling Delphi4 DLL

5. VC++ dlls calling FORTRAN dlls

6. Calling DLLs from TCL using ffidl or dll - please help

7. From a stub .dll call another .dll

8. LV 6.0.2: an App-built dll gives a runtime error when called by C

9. LV 6.0.2: an App-built dll gives a runtime error when called by C

10. Memory read problem when calling dynamic arrays in DLL built using VC++ (LabView 5)

11. Build DLL in C++ with ICC to call from ReXX

12. Build DLL in C++ with ICC to call from ReXX - rexxsa.zip [1/1]

 

 
Powered by phpBB® Forum Software