I would like to be able to pass a string to the IBM C/C++ compiler to include
in a program. I have tried every way I can think of to use the DEFINE()
compiler option but can't make it work. This is what I would like to do:
...
// EXEC PGM=CCNDRVR,PARM=('...DEFINE(MYSTRING=TEST)')
...
In the program --
...
#pragma comment(copyright, "This program was compiled on " __DATE__ " with the
" MYSTRING " option");
...
The compiler gets an error that it expected ")" but found "TEST" (it likes
__DATE__ just fine). I have tried DEFINE(MYSTRING='"TEST"') (with the set of
quotes), using another macro:
#define test_string(option) #option
but test_string(MYSTRING) generates "MYSTRING" not "TEST".
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN