Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

linke ifort with created lib

ppthelion
Beginner
568 Views
Hi:
I have problem with run with created lib "HEALPix" which down from JPL .my environment is "Fedora 12 , ifort 11.064" ,what I have done as follows:
the command I used: compile:ifort -c check_HEALpix.f90 -I{INCLUDE} -I/opt/healpix/include -L{LIBRARY_PATH} -L/opt/healpix
/lib/libhealpix.a -fpp -assume underscore
it sounds no errors or warnnings.but then I want to run it
run : ifort -o check check_HEALpix.o
the compilor showed: check_HEALpix.o: In function `MAIN__':
check_HEALpix.f90:(.text+0x236): undefined reference to `pix_tools_mp_nside2npix_'
check_HEALpix.f90:(.text+0x6d5): undefined reference to `pix_tools_mp_pix2vec_ring_'
check_HEALpix.f90:(.text+0x733): undefined reference to `pix_tools_mp_vec2ang_'
check_HEALpix.f90:(.text+0x804): undefined reference to `alm_tools_mp_alm2map_sc_d_'
check_HEALpix.f90:(.text+0x822): undefined reference to `alm_tools_mp_map2alm_sc_d_'
check_HEALpix.f90:(.text+0x940): undefined reference to `alm_tools_mp_alm2map_sc_d_'
But when I checked the library
:: nm /opt/healpix/lib/libhealpix.a | egrep "pix_tools_mp_vec2ang"
the result is ::00019760 T pix_tools_mp_vec2ang_
it seems that this function is contained in the library,so why this happens?
Any hints is appreciated
Thanks

0 Kudos
2 Replies
TimP
Honored Contributor III
568 Views
Did you check whether the library is for the same architecture as your compiler?
file healpix.a
ifort -V
0 Kudos
ppthelion
Beginner
568 Views
Thanks for your reply,I did as your follows,but I don't know if there any difference between them.
file healpix.a :: (result) current ar archive
ifort -V :: (result) Intel Fortran Compiler Professional for applications running on IA-32, Version 11.1 Build 20090827
Package ID: l_cprof_p_11.1.056

0 Kudos
Reply