Have a problem on with C++ preprocessor. After calling g++ -E main.cpp I get Memory fault (core dumped). C preprocessor works fine. Also QCC -E -Y _gpp main.cpp completes without errors. WTF?
I’ve never seen 3.3.1. I only have 2.95.3 and 3.3.5 on my QNX 6.30 system.
My guess is that qcc and g++ are using different versions of the compiler. I’ve personally never used g++ from the command line, I only use qcc.
if you do a qcc -V from the command line, which is the default GNU compiler listed?
If you do a g++ -dumpversion from the command line what is the default compiler listed?
I tried the command ‘g++ -E test.cpp’ on my 6.30 SP3 system on a file that’s about 1000 lines long. It didn’t crash but then I’m not using 3.3.1 either.
Interestingly the only thing it does is simply echo out the file line by line to the screen. Is that what it’s supposed to do?
Maybe it crashes if your file is too large or contains a funny character. It may be core dumping under qcc as well but since qcc is running g++ in the background you may not be aware of it (you’d need to have dumper running and clear /var/dumps and then run the qcc command and see if a dump file gets created for g++).
Sure, you are right but this error is annoying during compiling some FOS software and probably can be the reason of failed compilation. Anyway, thanks for the help.