I'm having trouble linking against Intel MKL using Eclipse CDT. The advice from Intel's Link Line Advisor Tool, per my specific requirements, is to use the Link Line:
-Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl
A more readable form of what I need:
--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core --end-group
The problem is the --start-group --end-group syntax is not (AFAIK) an option within Eclipse. The MKL library has a lot of circular dependencies; this syntax is necessary to avoid having to repeatedly link libraries. Without this syntax, I have this terrible list of libs:
-lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_sequential -lmkl_core -lmkl_sequential -lmkl_core -lmkl_sequential
So the question is how to configure Eclipse CDT to link Intel MKL libraries, using the --start-group syntax to prevent circular references?