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

DLL Building; Mixed Language Programming

kps
初学者
1,310 次查看
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 项奖励
6 回复数
Jugoslav_Dujic
重要分销商 II
1,310 次查看
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 项奖励
hovi
初学者
1,310 次查看
In the "project settings" -> "Links" -> Category "General", is the "Doesn't produce LIB" checkbox marked?


hovi
0 项奖励
Steven_L_Intel1
1,310 次查看
The usual reason for not getting a LIB is failure to name the routines in an ATTRIBUTES DLLEXPORT directive.

Steve
0 项奖励
kps
初学者
1,310 次查看
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 项奖励
tawol
初学者
1,310 次查看

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 项奖励
Steven_L_Intel1
1,310 次查看
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 项奖励
回复