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

error creating a dll

kooka
Beginner
445 Views
im trying to create a DLL and when i build it it supposed to create a LIB import library, but i only see the dll file and other files like *.pdb, *.mod and *.obj. so i cant import it in my .exe file. Do you know what am i doing wrong?
0 Kudos
1 Solution
Steven_L_Intel1
Employee
445 Views
This error means that you have not linked in the object or library that resulted from building module VARIABLES.

View solution in original post

0 Kudos
4 Replies
ZlamalJakub
New Contributor III
445 Views
You are probably not exporting any routine from dll to be visible to your exe file. You must use

!DEC$ ATTRIBUTES DLLEXPORT::

subroutine ExportedFunction()
!DEC$ ATTRIBUTES DLLEXPORT:: ExportedFunction
...
return
end

Then routine ExportedFunction can be called from Your exe file and linker creates LIB file.

Jakub Zlamal
0 Kudos
kooka
Beginner
445 Views
Quoting - kooka
im trying to create a DLL and when i build it it supposed to create a LIB import library, but i only see the dll file and other files like *.pdb, *.mod and *.obj. so i cant import it in my .exe file. Do you know what am i doing wrong?

thanks man, you are right it was the error. But now i have another problem. I can Build the librarys and run the .exe file in debug mode, but when i change to release mode when i try to buil the library i have an error like this:

Creating library Release/sysfunc.lib and object Release/sysfunc.exp
WRSLTS.OBJ : error LNK2001: unresolved external symbol _VARIABLES_mp_NELEM
...
Release/sysfunc.dll : fatal error LNK1120: 33 unresolved externals
Error executing link.exe.

thank you so much!.

0 Kudos
ZlamalJakub
New Contributor III
445 Views
Are there compiler errors oronly linker error?

I can only suggest:
1. Try to rebuild library (may be some compiled file is not p to date)

2. check include paths if they are the same in debug and release version.

I never obtain this kind of error when building release version.

Jakub Zlamal
0 Kudos
Steven_L_Intel1
Employee
446 Views
This error means that you have not linked in the object or library that resulted from building module VARIABLES.
0 Kudos
Reply