Compiling C++ programs with templates, STL libraries, etc. is possible on SCC, but it takes a few changes to your compiler/linker options.Here is a list of the changes I had to make to our makefile to get our C++ code compiling and running.
There is a bug in the version of icpc/icc used to compile for SCC that can cause undefined references to template instantiations.If you see such an error when linking, just add explicit template instantiations to your source files.Specifically, we saw this error when explicitly instantiating templates that call other templates.The callee was not being instantiated with the caller.
Use the –i-static link option instead of –static.Change this option in the common/symbols.in file in your RCCE folder before configuring and making RCCE.Then, you can use the linker options in the common/symbols file.
Use the –cxxlib-icc link option to pull in the C++ libraries like those for STL classes.
Use the -I/opt/icc-8.1.038/include/c++ compile option to get the C++ headers.
Use the -L/opt/i386-unknown-linux-gnu/i386-unknown-linux-gnu/lib link option to prevent the compiler from loading from /usr/lib, which holds unsupported libraries.