- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I compile my program, I am creating a dll with it. when the dll is created there are 4 files that are created with it. A .lib, .exp, .obj, and a .manifest. Is there a way to specify where these files are placed when they are created. I do not want them in the base directory.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not surprised. If you read what you have posted carefully, you won't be either.
Link Copied
10 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/exe: and /object: options may be used for the .lib .exe and .obj files. For the manifest, you should be able to append /link /MANIFESTFILE:filename or use VS linker properties.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to specify where the .exp and .lib files are placed, that are generated to create the dll. Also, with the latest version of the Fortran compiler, we are getting this manifest file. Where and why does it come from?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The manifest file is created by the linker, as of VS2005. It is used by the Manifest Tool (mt.exe) to embed the manifest in the DLL - this is done as part of the normal build from Visual Studio. Manifests are used by Windows to locate dependent DLLs and can be used in conjunction with "shared assemblies" to install dependent DLLs in such a way that they are not dependent on PATH, etc., and avoid version conflicts. Normally, this is handled for you automatically and you don't need to refer to the manifest file again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I understand that, but what about the .exp and .lib file that is created when creating the dll. Can I tell the maker where to place them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can specify the .lib location under Linker > Advanced > Import Library. You could probably redirect the default by changing the value of Configuration Properties > General > Output Directory and then set the linker output to be where you want the DLL to be written.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am compiling from an INTEL command prompt. Do you know what the commands would be?
Also, I am noticing that my program does does work now with the latest version IFC. If I tell it to ignore the dll, then it runs.
When I try to run it with the dll, I am getting a window with an error.
THe application was unable to start correctly (0x80000003). Click OK to close the application.
THe program with the DLL works fine when compiles with CFC.
Also why is it that the CFC deletes the obj file for my dll when it is done and IFC does not.
I also just noticed that my CFC places the .lib and .exp where ever I tell it to put the dll, but the IFC does not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you build from the command line, you have to run the Manifest Tool to embed the manifest the way that Visual Studio does. This is required starting with VS2005.
To do this, add this after your link command:
mt /manifest $(name).dll.manifest /outputresource:$(name).dll;2
where $(name) is the name of your DLL.
It's the Microsoft linker that creates the .lib and .exp files. Any difference is due to different Visual Studio versions, though I have not seen this as a difference myself.
The linker option for the manifest file is /MANIFESTFILE. The one for the export library is /IMPLIB.
To do this, add this after your link command:
mt /manifest $(name).dll.manifest /outputresource:$(name).dll;2
where $(name) is the name of your DLL.
It's the Microsoft linker that creates the .lib and .exp files. Any difference is due to different Visual Studio versions, though I have not seen this as a difference myself.
The linker option for the manifest file is /MANIFESTFILE. The one for the export library is /IMPLIB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I added the line that you mentioned.
$(f90) -nologo $(FFLAGS) $(FPSTOP) $(FL) -dll -Id \
relap\relap5l.for relap\ufilef.$O envrl\fabend.$O \
-link -out:relap5.dll
mt -manifest relap5l.dll.manifest \
-outputresource:relap5l.dll;2
$(f90) -nologo $(FFLAGS) $(FPSTOP) $(FL) -dll -Id \ relap\relap5l.for relap\ufilef.$O envrl\fabend.$O \ -link -out:relap5.dll mt -manifest relap5l.dll.manifest \ -outputresource:relap5l.dll;2I am getting an error.
mt.exe : general error c10100b1: Failed to load file "relap5l.dll". The system cannot find the file specified.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not surprised. If you read what you have posted carefully, you won't be either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oops! The coding got pasted twice. Here is what I have.
$(f90) -nologo $(FFLAGS) $(FPSTOP) $(FL) -dll -Id \
relap\relap5l.for relap\ufilef.$O envrl\fabend.$O \
-link -out:relap5l.dll
mt -manifest relap5l.dll.manifest \
-outputresource:relap5l.dll;2
The F90 = ifort
Yay! I figured it out after reposting the coding. Thank you for your help!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page