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

best way to set/control dll properties

bmchenry
New Contributor II
3,154 Views
creating a number of dlls for distro in latest version and VS 2010 pro.
How does one go aboutsettingdll properties (file version, product name, product version, copyright, etc?)
Can see only 'version' in linker step.

thanks!
0 Kudos
10 Replies
Steven_L_Intel1
Employee
3,154 Views
This is done with a "version" resource, created with the resource editor. You will need to have MS Visual C++ installed in order to use the resource editor - the Visual Studio Shell does not have it. Project > Add to Project > New > Resource File.
0 Kudos
bmchenry
New Contributor II
3,154 Views
hmmmm...
i do have C++, etc etc
however the confusion occurs because the 'solution' has 4 dll 'projects' and each results in a different dll name/version/etc
sowould it require 4 different 'version' resources, one for each dll?

i have been searching the web to see if someone has created a simple utility to open and edit each dll after it is built (so far all command line utilities which seems a step back to the dark ages...read the dll info allow and edit, and set it!)

Or from within Intel Fortransomething like getinforversionstring from prior thread...
http://software.intel.com/en-us/forums/showthread.php?t=82960&o=a&s=lr
except as a 'set' infoversionstring.


0 Kudos
Steven_L_Intel1
Employee
3,154 Views
Yes, each project would need its own version resource. The Windows API for getting version info reads this resource. There might be some utility that adds a version resource to a DLL or EXE that doesn't have one, but I am not familiar with any.

The .rc file is really just a text file so you could have a script that runs at the start to build it. You can also #include a section from another file so that could be used to share the version info.
0 Kudos
bmchenry
New Contributor II
3,154 Views
FYI for other Intel Fortran users wanting to change/modify version information in dlls/exes etc:
Found a program Resource Tuner by HeavenTools that does the trick w/o me having to mess with adding C++ etc to solutions/project/etc.
(i needed to add the version information quickly)
Resource Tunerrequiresan extra external step to add the information to the dll/exe but for now that works for me.

Note that the 'console version' of Resource Tuner is required toadd version information
Intel fortran projects/solutions create dlls and exe's without anyversion information so the information has to be added.
once added then the version informationcan be edited by either version of Resource tuner.

At some point i exppect i will revisit theproject/solutiuonand addC++ components to add the version information w/o requiring the extra external step.
i will then also try to remember topost up a sample mixed language project so others can easily add version information

B

and note, i am not affiliated with heaventools/resource tuner in any way. just sifted through a few offerings on the web and found this one does the trick.

0 Kudos
DavidWhite
Valued Contributor II
3,154 Views
While you need C++ installed, adding the resource component into a Fortran DLL does not need any C++ code. Just add the resource to your project and edit the properties from the menu in VS. No need to know any C++ either. Note, as mentioned before, this requires the independent VS install, rather than the bundled version with IVF. All of my DLL apps have this info embedded.

Regards,


David
0 Kudos
bmchenry
New Contributor II
3,154 Views

I tried adding a version.rc to a project and it compiles fine, however the resulting exe/dll still doesn't have the 'version' information inserted.
Iright click on the file it does not displays the information.

If i open with Resource Tuner it DOES appear to have the informaiton inserted.
Any idea how to get it to show in general w/o having to resort to an external program to add/edit/etc?

I insert (the attachement looked awful!)a sampleversion.rc text file (with my information removed and generic stuff inserted).
Is there something missing?

thanks


//

// Version

//

VS_VERSION_INFO VERSIONINFO

FILEVERSION 1,0,0,0

PRODUCTVERSION 1,0,0,0

FILEFLAGSMASK 0x3fL

#ifdef _DEBUG

FILEFLAGS 0x1L

#else

FILEFLAGS 0x0L

#endif

FILEOS 0x4L

FILETYPE 0x1L

FILESUBTYPE 0x0L

BEGIN

BLOCK "StringFileInfo"

BEGIN

BLOCK "040904b0"

BEGIN

VALUE "Comments", "Sample Application\0"

VALUE "CompanyName", "Your Company Here\0"

VALUE "FileDescription", "All about this file\0"

VALUE "FileVersion", "1, 0, 0, 0\0"

VALUE "InternalName", "filename\0"

VALUE "LegalCopyright", "Copyright (C) 2011 You or Your company\0"

VALUE "OriginalFilename", "file.EXE\0"

VALUE "ProductName", "whatever you name your Product\0"

VALUE "ProductVersion", "1, 0, 0, 0\0"

END

END

BLOCK "VarFileInfo"

BEGIN

VALUE "Translation", 0x409, 1200

END

END



0 Kudos
Steven_L_Intel1
Employee
3,154 Views
Did the .rc compile into a .res and did the .res get linked in?
0 Kudos
bmchenry
New Contributor II
3,154 Views
yes and yes.
and with the external tool (Resource Tuner) i see the information is in the exe (in the sample i am recompiling an exeto try it out)
however i'd like the version informationto be seen by anyone who right clicks on the exe.
0 Kudos
Steven_L_Intel1
Employee
3,154 Views
If you right click and select Properties > Details, does it show up there? If the version info is in the EXE it ought to show up.
0 Kudos
bmchenry
New Contributor II
3,154 Views
no it does not contain any version information.
i set up a sample from an old solution/project file.
i attach the file.

brian
0 Kudos
Reply