Hi, I had the notion that the order of arguments to the compiler do not matter. But this does not seem to be the case atleast during the linking stage.
When I give the following arguments to icc 13.0,
$ icc -L../annotations -openmp -lrt -lannotations -o ../bin/cg.B_annot cg_annot.o ../common/c_print_results.o ../common/c_randdp.o ../common/c_timers.o ../common/c_wtime.o
This throws lots of errors of undefined references for methods declared in libannotations. But when I give the following arguments:
$ icc -L../annotations -o ../bin/cg.B_annot cg_annot.o ../common/c_print_results.o ../common/c_randdp.o ../common/c_timers.o ../common/c_wtime.o -openmp -lrt -lannotations
It works flawlessly! What am I missing??
pranith wrote:... Please take a look at: ... http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/index... ...
This is actually during the linking phase. Is there any documentation as to which order one should pass the flags to the linker?