Linking libraries in the right order

mirix miro... at
Sat Mar 9 13:30:33 UTC 2013


I would like to know if there are any general rules on the correct order 
for linking libraries when compiling CP2K.

For instance, I have this:

LIBS     = -L/home/mirix/hwloc/lib/libhwloc.a -lxml2 -lpci\
/home/mirix/hwloc/lib/libhwloc.a -lxml2 -lpci\
-lstdc++ -lpthread -lrt

This gives: cuda_cublas.f90:(.text+0x91): undefined reference to 

Depending on the order of the libraries I receive different "undefined 
reference" errors. I am trying different options, but I still have not 
found a working combination.

Any ideas?

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the CP2K-user mailing list