Recompiling iFort project under PGI

Hello everyone.

I’m trying to recompile a program previously compiled in iFort. After making through a few problems I met one, that I cannot easily solve. There is a problem with mathmematical functions, that - as far as I know - should be intrinsic.
I’ve got this results during compilation:

axis.obj : error LNK2019: unresolved external symbol __fmth_i_alog10 referenced in function axis_
xrnd.obj : error LNK2001: unresolved external symbol __fmth_i_alog10
xysc.obj : error LNK2001: unresolved external symbol __fmth_i_alog10
axis.obj : error LNK2019: unresolved external symbol __fmth_i_rpowr referenced in function axis_
trnsfm.obj : error LNK2001: unresolved external symbol __fmth_i_rpowr
xrnd.obj : error LNK2001: unresolved external symbol __fmth_i_rpowr
xysc.obj : error LNK2001: unresolved external symbol __fmth_i_rpowr
axis.obj : error LNK2019: unresolved external symbol __mth_i_rpowi referenced in function axis_
geteoi.obj : error LNK2001: unresolved external symbol fgzread_
cginfo.obj : error LNK2019: unresolved external symbol fgzread_ referenced in function cginfo_
wginfo.obj : error LNK2001: unresolved external symbol fgzread_
buffi.obj : error LNK2001: unresolved external symbol fgzread_
buffii.obj : error LNK2001: unresolved external symbol fgzread_
clegnd.obj : error LNK2019: unresolved external symbol __mth_i_nint referenced in function clegnd_
srfplt.obj : error LNK2001: unresolved external symbol __mth_i_nint
xysc.obj : error LNK2001: unresolved external symbol __mth_i_nint
vecwrt.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
vtxset.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
strwrt.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
trcplt.obj : error LNK2019: unresolved external symbol __fmth_i_sincos referenced in function trcplt_
vcplt3.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
vecplt.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
rdreq.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
srfplt.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
srftri.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
srftri_old.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
drfp.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
drobv.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
exvect.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
plyshd.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
cntr.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
dgrid.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
drbaf.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
drfcyl.obj : error LNK2001: unresolved external symbol __fmth_i_sincos
drdash.obj : error LNK2019: unresolved external symbol __mth_i_atan referenced in function drdash_
drdash.obj : error LNK2019: unresolved external symbol __fmth_i_cos referenced in function drdash_
exgrid.obj : error LNK2001: unresolved external symbol __fmth_i_cos
drdash.obj : error LNK2019: unresolved external symbol __fmth_i_sin referenced in function drdash_
exgrid.obj : error LNK2001: unresolved external symbol __fmth_i_sin
exgrid.obj : error LNK2019: unresolved external symbol __c_mset4 referenced in function exgrid_
loadbv.obj : error LNK2001: unresolved external symbol __c_mset4
movev.obj : error LNK2001: unresolved external symbol __c_mset4
ffclose.obj : error LNK2019: unresolved external symbol cclose_ referenced in function ffclose_
vcplt3.obj : error LNK2001: unresolved external symbol __c_mzero4
rdr_get_fixed_times.obj : error LNK2001: unresolved external symbol __c_mzero4
rdr_get_history_times.obj : error LNK2001: unresolved external symbol __c_mzero4
rdr_get_solid_times.obj : error LNK2001: unresolved external symbol __c_mzero4
rdr_get_restart_times.obj : error LNK2001: unresolved external symbol __c_mzero4
flscon.obj : error LNK2019: unresolved external symbol __c_mzero4 referenced in function MAIN_
lcomp.obj : error LNK2001: unresolved external symbol __c_mzero4
ldata_srf.obj : error LNK2001: unresolved external symbol __c_mzero4
rdr_get_selected_times.obj : error LNK2001: unresolved external symbol __c_mzero4
fopenw.obj : error LNK2019: unresolved external symbol copenw_ referenced in function fopenw_
fwritc.obj : error LNK2019: unresolved external symbol cwritc_ referenced in function fwritc_
fwritf.obj : error LNK2019: unresolved external symbol cwritf_ referenced in function fwritf_
fwriti.obj : error LNK2019: unresolved external symbol cwriti_ referenced in function fwriti_
rdtims.obj : error LNK2001: unresolved external symbol __c_mcopy4
rdr_get_history_times.obj : error LNK2019: unresolved external symbol __c_mcopy4 referenced in function rdr_get_history_times_
rdr_get_solid_times.obj : error LNK2001: unresolved external symbol __c_mcopy4
rdr_get_restart_times.obj : error LNK2001: unresolved external symbol __c_mcopy4
rdr_get_stl_info.obj : error LNK2001: unresolved external symbol __c_mcopy4
pent.obj : error LNK2001: unresolved external symbol __c_mcopy4
rdreq.obj : error LNK2001: unresolved external symbol __c_mcopy4
rdr_get_selected_times.obj : error LNK2001: unresolved external symbol __c_mcopy4
rdr_get_fixed_times.obj : error LNK2001: unresolved external symbol __c_mcopy4
fwriti.obj : error LNK2001: unresolved external symbol __c_mcopy4
lcomp.obj : error LNK2001: unresolved external symbol __c_mcopy4
ldata.obj : error LNK2001: unresolved external symbol __c_mcopy4
lent.obj : error LNK2001: unresolved external symbol __c_mcopy4
part2d.obj : error LNK2019: unresolved external symbol __mth_i_atan2 referenced in function part2d_
srftri.obj : error LNK2019: unresolved external symbol dbyteorder_ referenced in function srftri_
srftri.obj : error LNK2019: unresolved external symbol __fmth_i_alog referenced in function srftri_
srftri_old.obj : error LNK2001: unresolved external symbol __fmth_i_alog
trnspk.obj : error LNK2019: unresolved external symbol __mth_i_ipowi referenced in function trnspk_
wginfo.obj : error LNK2019: unresolved external symbol fsleep_ referenced in function wginfo_
geteoi.obj : error LNK2001: unresolved external symbol fsleep_
f3dcli.obj : error LNK2019: unresolved external symbol cifcil_ referenced in function f3dcli_
f3dclo.obj : error LNK2019: unresolved external symbol lcovvs_ referenced in function f3dclo_
flocws.obj : error LNK2019: unresolved external symbol symcon_ referenced in function flocws_
geteoi.obj : error LNK2019: unresolved external symbol __mth_i_kpowi referenced in function geteoi_
geteoi.obj : error LNK2019: unresolved external symbol fgzopen_ referenced in function geteoi_
waopen.obj : error LNK2001: unresolved external symbol fgzopen_
waopengz.obj : error LNK2001: unresolved external symbol fgzopen_
geteoi.obj : error LNK2019: unresolved external symbol fgzclose_ referenced in function geteoi_
waclos.obj : error LNK2001: unresolved external symbol fgzclose_
flscon.exe : fatal error LNK1120: 28 unresolved externals

What can be a reason? Any clues?
Let me know if I should put some additional info.

Hi szczelba,

How are you linking you’re executable? These errors indicate that the PGI runtime librarie were not added to your link.

If you are not using a PGI driver to link, then you will need to add the runtime libraries or switch to a PGI driver (like pgfortran). If you are using a PGI driver to link, add the same optimization flags to the link as you used to compile. Some optimizations require additional libraries (such as -fastsse) which are added only when the same flag is added to the link as well.

  • Mat