I encounter a little issue in the precompilation process of our PRO*C code.
It was designed to be compiled on Solaris with PRO*C and CC.
Now that we are changing to AIX, we have many simple modifications to make.
Our actual configuration is:
PRO*C/C++ Release 220.127.116.11.0
the PRO*C compilation options are sqlcheck=full , lines = yes , code =ansi_c parse=partial
Now we are puzzled by a specific issue.
The error code is common:
PCC-S-02021, Nouvelle ligne détectée au cours du balayage d'un littéral chaîne
Found newline while scanning string literal
PCC-S-02010 fin de fichier détecté au cours du balayage d'une constante chaine
found end-of-file while scanning string literal
the actual error comes from a simple quote in
sprintf(gtc_msg,"french sentence with a single quote ' and two constants '%s' '%s' ", Const1,Const2);
It was working with the old configuration, but now on AIX we have an error. It is "solved" by removing the simple quote ( the use of backslash \' does not work.)
Now that it's removed, it seems that the errors keep on rising from every single quote presented in strings and also in "//" comments line !
To resume, what kind of option is needed to make proc understand the simple quote as it was in our old server?
Or what could be the source of the problem.
sprintf is a standard C function. Pro*C is just a pre-compiler, which converts the .pc program into a C program.
Have you tried writting a simple C program with sprintf having single quotes in format string?
Compile it with your C compiler and run.