- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am compiling using
Windows 10 - IFC Version 15.0.1.148 Build 20141023
I am getting error creating my DLL. I can create a EXE just fine.
Makerfile
FL = -auto -Qansi_alias- -pad_source -traceback \
-fltconsistency -fpconstant -nogen-interfaces
$(r)5.dll : lib\$(e)$(NM).lib lib\graphics.lib \
lib\$(m)$(NM).lib lib\$(r)$(NM).lib \
$(r)\$(r)5.$O lib\$(s)$(NM).lib \
tpfh2o$(NM) tpfd2o$(NM)
$(f90) -nologo $(FFLAGS) $(FPSTOP) $(FL) -threads -dll \
$(r)\$(r)5.$O lib\$(r)$(NM).lib lib\$(s)$(NM).lib \
lib\$(m)$(NM).lib lib\$(e)$(NM).lib \
lib\graphics.lib libmmt.lib kernel32.lib ifqwin.lib gdi32.lib \
libifcoremt.lib libifport.lib \
user32.lib libirc.lib comdlg32.lib ifqw_mdi.lib libcmt.lib \
imagehlp.lib opengl32.lib glu32.lib lib\f90gl.lib lib\f90glu.lib \
lib\f90glut.lib lib\glut32.lib -link -out:$(r)5.dll -nodefaultlib
The error that I am getting is:
libifcoremt.lib(for_main.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main
relap5.dll : fatal error LNK1120: 1 unresolved externals
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try placing the -dll option after -link to ensure it is passed to the link phase. It seems like the error indicates the link wants to create an .exe instead of a DLL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I moved -dll to be after -link and that made no difference.
$(r)5.dll : lib\$(e)$(NM).lib lib\graphics.lib \
lib\$(m)$(NM).lib lib\$(r)$(NM).lib \
$(r)\$(r)5.$O lib\$(s)$(NM).lib \
tpfh2o$(NM) tpfd2o$(NM)
$(f90) -nologo $(FFLAGS) $(FPSTOP) $(FL) -threads \
$(r)\$(r)5.$O lib\$(r)$(NM).lib lib\$(s)$(NM).lib \
lib\$(m)$(NM).lib lib\$(e)$(NM).lib lib\graphics.lib \
libmmt.lib kernel32.lib ifqwin.lib gdi32.lib libifcoremt.lib \
libifport.lib user32.lib libirc.lib comdlg32.lib ifqw_mdi.lib \
libcmt.lib imagehlp.lib opengl32.lib glu32.lib lib\f90gl.lib \
lib\f90glu.lib lib\f90glut.lib lib\glut32.lib \
-link -dll -out:$(r)5.dll -nodefaultlib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. I don't have anything readily available to try this myself at the moment. Are you just using a makefile under something like Cygwin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I may suggest ...
Please put /dll back before the /link.
And, before the "-nologo" please add "-Bd". This will show the driver-tool commands, and should help us understand why "/dll" isn't being honored.
Redirect the output to a file, and attach it to a reply, please. If there are sensitive filenames, etc. in the output, feel free to scramble them, but please leave the actual "link" or "ifort" commands as is.
Thanks -
--Lorri
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page