Re: Question on multiple compiler environment



simon@xxxxxxxxxxxxxx wrote:
With the Intel v8.0 compiler on windows you can insert text into the
object:

ifort -help
...

/V<text> embed version text in executable
/bintext:<string>
place the string specified into the object file


I think this is also true of the later and Linux versions of the
compiler. Not quite sure how you use this facility though!

Thanks for mentioning these options. Both also exist on IVF 9.1 for
Windows.

I can embed a version string and then search for it using a Windows
batch file like this

@ echo off
:: version string to be embedded
set vers=versionxyz_
set str=abcd
set full=%vers%%str%
set srcs=twice.f90 xtwice.f90
if exist %exec% del %exec%
set exec=temp.exe
ifort /nologo /bintext:%full% /exe:%exec% %srcs%
if exist %exec% %exec%
:: show the version number
findstr %str% %exec%

but findstr is meant for searching text files, and the output is ugly.

.



Relevant Pages

  • Re: Multi-line "Srchfor" Utility?
    ... specified on the command. ... for each EXEC CICS command, that literal is a bit string (arg 0 in the ... EXEC CICS GETMAIN, but beyond that I'd need to refer to the CICS Data ...
    (bit.listserv.ibm-main)
  • Re: Help! Using Different version GCC generate different object file ??(for same source file)
    ...    In the Sun server with the lower version GCC, ... Part II: Object file info ... the command <dump> we use to check the object file, ... In contrast to SUN's 'dump -c' this doesn't output a string table ...
    (comp.unix.questions)
  • Re: Winter Madness - Passing Python objects as Strings
    ... "seldom" here is like once a day for a few minutes. ... name as a string and mucking around with exec or eval - ... for the exec to work. ... precious cycles in an extra unpacking stage. ...
    (comp.lang.python)
  • Re: how can I execute a function string
    ... > I have some code that generates a function on the fly in a string. ... exec generate_func ... A *slightly* better approach is to make a code object, using compile(). ... def gen_func: ...
    (comp.lang.python)
  • Re: Casting to VARCHAR(MAX)
    ... But when you do the EXEC, the statement the EXEC passes to SQL Server looks like ... So the string that gets put into #TEMP1 will be truncated to 8000 characters. ... that will force the whole expression concatenating the strings to return VARCHARand you would get the whole string inserted into the table. ...
    (microsoft.public.sqlserver.programming)