annoying error about ntcdf

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
bibi951
Posts: 45
Joined: Tue Mar 17, 2009 4:06 pm
Location: cpeo,ocean university of china

annoying error about ntcdf

#1 Unread post by bibi951 »

Hi,everyone.
I am sorry to bother anyone here.I meet the annoying error again which I met a couple of days ago. I can't find what's wrong, so I hope someone can help me out. This is when I use OTPS for tide simulation.
g95 -fno-second-underscore -fleading-underscore -L/usr/local/lib -lnetcdf -I/usr/local/include -o extract_HC extract_HC.f subs.f
/cygdrive/d/DOCUME~1/Sun/LOCALS~1/Temp/cc5QFR52.o:extract_HC.f:(.data+0x328): undefined reference to `_nf__create_mp_'
/cygdrive/d/DOCUME~1/Sun/LOCALS~1/Temp/cc5QFR52.o:extract_HC.f:(.data+0x32c): undefined reference to `_nf__create_'

I have checked my libnetcdf.a
$ nm libnetcdf.a | grep nf__create_mp
000005a0 T _nf__create_mp_
U _nf__create_mp_
I am so puzzled about this.
Would someone give me some indication?
Thanks in advance .

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: annoying error about ntcdf

#2 Unread post by kate »

bibi951 wrote: g95 -fno-second-underscore -fleading-underscore -L/usr/local/lib -lnetcdf -I/usr/local/include -o extract_HC extract_HC.f subs.f
Put the -lnetcdf at the end of that command. The order matters.

bibi951
Posts: 45
Joined: Tue Mar 17, 2009 4:06 pm
Location: cpeo,ocean university of china

Re: annoying error about ntcdf

#3 Unread post by bibi951 »

Thank you,Kate.
I really appreciate your guide.Thank you.

Post Reply