Why does the Informix 4GL compiler complain about unknown option -fwritable-strings?

278 views Asked by At

I am beginner at Informix and when I want to compile and debug a program in Informix 4GL, but I can't.

This the code:

MAIN 
   DISPLAY "HELLO"
END MAIN

And this the problem:

cc:errors: option "-fwritable-strings" non reconnue sur la ligne de commande, aviez-vous l'intention d'utiliser "-writ-string" 4GL
1

There are 1 answers

18
Jonathan Leffler On BEST ANSWER

It appears that the c4gl script is setting the GCC command option -fwritable-strings but your C compiler (apparently cc, but it could be a link to GCC) doesn't recognize it.

Depending on whether you have GCC or not, there are different ways to fix it. GCC 5.x (confirmed with GCC 5.3.0) and later does not support the option. Linux has been stuck on GCC 4.x for a long time, but is finally moving forward to later versions of GCC. So, if you've using GCC 5.x or later (use cc --version or gcc --version to find out which version you're using), you will need to edit the c4gl script (after making a backup copy of it) to remove the option.

However, there's also a chance that it was crucial and the code in the I4GL library does end up trying to modify string literals sometimes, and that will cause the program to crash. At that point, you're stuck with trying to report a problem to IBM Informix (HCL) technical support, assuming you have support, or with downgrading to a version 4.x GCC compiler.