Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

DLL Building; Mixed Language Programming

kps
Beginner
1,065 Views
I am building a FORTRAN ".DLL" file in the Development Studio Environment (for the first time). The menu item "Build ...dll" builds the ".dll" file all right, but the corresponding librrary file ".lib" is not produced. The documentation says that for a mixed language programming, (my intent is to call this ".DLL" file from a Visual Basic Program, the corrsponding ".lib" file is required.

Can any one help me in this respect - I must be missing something.

Thanks!

Krishna Sinha
0 Kudos
6 Replies
Jugoslav_Dujic
Valued Contributor II
1,065 Views
Lib is required (but not mandatory even there) only for binding with .exe projects written in VC++ and Visual Fortran. VB and Delphi use a different mechanism beyond the scenes (dynamic binding).

I don't know why you don't get the lib -- try recreating the workspace from scratch, maybe some linker option got screwed.

Jugoslav
0 Kudos
hovi
Beginner
1,065 Views
In the "project settings" -> "Links" -> Category "General", is the "Doesn't produce LIB" checkbox marked?


hovi
0 Kudos
Steven_L_Intel1
Employee
1,065 Views
The usual reason for not getting a LIB is failure to name the routines in an ATTRIBUTES DLLEXPORT directive.

Steve
0 Kudos
kps
Beginner
1,065 Views
Thank You all for your help. Steve's hunch was right - The .LIB file was not built because I had not used the "ATRIBUTES DLLEXPORT..." Directive. It saved me a lot of frustrating hours.
Thanks to all of you again.

Krishna Sinha
0 Kudos
tawol
Beginner
1,065 Views

Hi, I've got two projects, one is building a .lib-file, the other does not. Both projects use the "!DEC$ Attributes DLLEXPORT::..."

According to the output file, everything should be ok (building succeeds), but no .lib-file is created:

------ Build started: Project: FHydrateDLL, Configuration: Debug|Win32 ------

Deleting intermediate files and output files for project 'FHydrateDLL', configuration 'Debug|Win32'.

FHydrateDLL build succeeded.


Any ideas what it may be?

0 Kudos
Steven_L_Intel1
Employee
1,065 Views
Perhaps the DLLEXPORT directives are incorrect. Usually the problem I see is with fixed-form source files where the name of the routine goes past column 72. But in the build output you posted, I don't see any sources compiled.
0 Kudos
Reply