Hi, I was compiling ABRA for use on an IBM POWER8 system (ppc64le) with the xlC compiler and noticed it will fail compile, unable to find iostream:
[u0017592@sys-83519 abra]$ sudo make standalone JAVA_HOME=$JAVA_HOME
xlc++ -Isrc/main/c -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.1.ael7b_1.ppc64le/include -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.1.ael7b_1.ppc64le/include/linux src/main/c/assembler.c -o abra
src/main/c/assembler.c:5:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
Error while processing src/main/c/assembler.c.
make: *** [standalone] Error 1
I poked around a bit and discovered that this is because xlC doesn't import the C++ STL by default for .c files. Since the .c files are using the C++ STL, wouldn't it make more sense to rename the .c files to .cpp and retest it on both compilers to make sure no functionality changed (although none should) and update the Makefile? This would fix ABRA for the xlC compiler.
Would you be willing to accept a pull request that does this?
Hi, I was compiling ABRA for use on an IBM POWER8 system (ppc64le) with the xlC compiler and noticed it will fail compile, unable to find iostream:
I poked around a bit and discovered that this is because xlC doesn't import the C++ STL by default for .c files. Since the .c files are using the C++ STL, wouldn't it make more sense to rename the .c files to .cpp and retest it on both compilers to make sure no functionality changed (although none should) and update the Makefile? This would fix ABRA for the xlC compiler.
Would you be willing to accept a pull request that does this?