Undefined reference error in linking time

28 views
Skip to first unread message

Ivan Costa

unread,
Jun 1, 2009, 5:44:28 PM6/1/09
to gg...@googlegroups.com
Could anyone help me with this problem? I have compiled all modules with the same version of g95 and I got this erro.
 
Thanks,
 
Ivan
 
 
$ g95 dinverse.o zroots.o dcholsl.o p2chi.o outar.o readhead.o dfft.o number.o dcholdc.o f2kcli.o taper.o stats.o port.o cdg.o TesteII.o far.o rnumread.o hea
d.o cdchi.o charead.o numread.o sort.o -o TesteII_f95 -I c:/mingw/lib -I /c/msys/1.0/home/Anakin/matio-1.3.3/src/
TesteII.o:TesteII.f90:(.text+0x6b6): undefined reference to `matio_MP_fmat_open'
TesteII.o:TesteII.f90:(.text+0x7c0): undefined reference to `matio_MP_fmat_close'
TesteII.o:TesteII.f90:(.text+0x52e8): undefined reference to `matio_MP_fmat_varcreatedouble0'
TesteII.o:TesteII.f90:(.text+0x5309): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0x535a): undefined reference to `matio_MP_fmat_varwritedoubledata_0'
TesteII.o:TesteII.f90:(.text+0x536f): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0x677f): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0x67b0): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0x680a): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0x6825): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xc214): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xc235): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xc286): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xc29b): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xd37e): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xd39f): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xd3ed): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xd402): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xdde3): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xde04): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xde55): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xde6a): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xeaec): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xeb0d): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xeb5e): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xeb73): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xeb93): undefined reference to `matio_MP_fmat_varcreatedouble1'
TesteII.o:TesteII.f90:(.text+0xebb4): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xec05): undefined reference to `matio_MP_fmat_varwritedoubledata_1'
TesteII.o:TesteII.f90:(.text+0xec1a): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xf203): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xf224): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xf275): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xf28a): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xf7f6): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xf817): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xf868): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xf87d): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xfbeb): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xfc0c): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xfc5d): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xfc72): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0xfeb7): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0xfed8): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0xff29): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0xff3e): undefined reference to `matio_MP_fmat_varfree'
TesteII.o:TesteII.f90:(.text+0x10bb4): undefined reference to `matio_MP_fmat_varcreatedouble2'
TesteII.o:TesteII.f90:(.text+0x10bd5): undefined reference to `matio_MP_fmat_varwriteinfo'
TesteII.o:TesteII.f90:(.text+0x10c26): undefined reference to `matio_MP_fmat_varwritedoubledata_2'
TesteII.o:TesteII.f90:(.text+0x10c3b): undefined reference to `matio_MP_fmat_varfree'
head.o:head.f90:(.text+0x459): undefined reference to `matio_MP_fmat_varcreatedouble0'
head.o:head.f90:(.text+0x47a): undefined reference to `matio_MP_fmat_varwriteinfo'
head.o:head.f90:(.text+0x4b3): undefined reference to `matio_MP_fmat_varwritedoubledata_0'
head.o:head.f90:(.text+0x4c8): undefined reference to `matio_MP_fmat_varfree

--
[]'s

Ivan da Costa Vieira
ivanc...@gmail.com

John McFarland

unread,
Jun 12, 2009, 3:37:53 PM6/12/09
to gg95


On Jun 1, 4:44 pm, Ivan Costa <ivancvie...@gmail.com> wrote:
> Could anyone help me with this problem? I have compiled all modules with the
> same version of g95 and I got this erro.
>
> Thanks,
>
> Ivan
>
> $ g95 dinverse.o zroots.o dcholsl.o p2chi.o outar.o readhead.o dfft.o
> number.o dcholdc.o f2kcli.o taper.o stats.o port.o cdg.o TesteII.o far.o
> rnumread.o hea
> d.o cdchi.o charead.o numread.o sort.o -o TesteII_f95 -I c:/mingw/lib -I
> /c/msys/1.0/home/Anakin/matio-1.3.3/src/
> TesteII.o:TesteII.f90:(.text+0x6b6): undefined reference to
> `matio_MP_fmat_open'

Hi,

The -I (I as in "include") flag does not do any linking, it just tells
the compiler where to find .mod files. It looks like you also need to
link the matio library, with something like "-L /c/msys/1.0/home/
Anakin/matio-1.3.3 -l matio" (where here -l is l as in "library").

John
Reply all
Reply to author
Forward
0 new messages