[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20010406: [mfd] Using mcidas modules outside of a mcidas session (cont.)
- Subject: 20010406: [mfd] Using mcidas modules outside of a mcidas session (cont.)
- Date: Fri, 06 Apr 2001 06:51:53 -0600
>From: "Jeff Wilson" <address@hidden>
>Organization: ABoM
>Keywords: 200104052030.f35KUii31770 McIDAS gcc libf2c.a
Jeff,
>Tks for your help on this issue.
No problem.
>I thought it may have been something
>obvious like compile options but just did not know (the trials of a
>novice C programmer). I was a bit confused as in another program I am
>using the mcidas swbyt4_ via the M0swbyt4 code which I have put into
>my code and compiling the same way with no problems. (ie the M0 code is
>in my code and it calls the swbyt4_ code from the mcidas lib, crazy but
>it works. I can't remember why I don't just call the MO from the mcidas
>lib ). Now this has compiled then I will re examine the the M0swbyt4_
>stuff.
OK. Regarding the whole M0swbyt4 (a C entry point in the McIDAS library)
and swbyt4_ (a Fortran entry point in the McIDAS library), SSEC is kind
of backwards on this. The Fortran entry point is called from C, not
the other way around like 99% of McIDAS. It must have to do with
historic stuff.
>I tried your compile routine and it did not work. I got an undefined
>reference to 'MAIN_' from libf2c.so. I didn't really know what this
>meant but remembered earlier problems with compiling mcidas and
>libf2c.so so added in another -L and linked libf2c.a to a dir so it got
>that before the libf2c.so. It now compiles and runs. I have run the
>sample program and the output doesn't seem to make too much sense but I
>will play with it over the weekend.
The shared f2c library, libf2c.so does not contain the MAIN_ entry
point, but the static version, libf2c.a does. I advise my users to
install libf2c.a in /usr/local/lib and then define LD_LIBRARY_PATH
as:
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
I cover this in the "Notes and Warnings" section of my online documentation:
http://www.unidata.ucar.edu/packages/mcidas/770/mcx/warnings_mcx.html
>When I first ran into this problem some weeks ago I thought of emailing
>you straight away but thought you were fairly tied up and so tried Tom
>W instead. He spoke with Dave S as he was too far removed, they came
>back and said you seem to be on the right track but email the mdf.
I think emailing the mdf was the right course of action. It helps kick
off exchanges between folks doing McIDAS development. Now if we can
get people to be active in this list (me included), it will become a useful
resource for all.
>I was hesitant to do this and so checked the Programmers help again and
>saw Russ D had done the C shell for the mcidas manual so I tried him.
>Russ eventually got back to me with you seem to be on the right track,
>good question I would like to know the answer why not send it to the
>mdf. So I sent it there and you answered :). Russ also got back with
>its seems to be a compile problem but not as helpful as your comments.
Well, of the four people you mention (Tom W, Dave S, Russ D, and me), I
am the most familiar with Linux issues. Even if I am the only one to
jump out and answer questions like the one you posed, please keep sending
them to the mfd list. Again, if we can get developers talking to each
other, all will benefit.
>When I get it sorted I will resubmit it back to the list in case anyone
>wanted to know the answer.
Sounds good.
>I have also been playing with some java from home after a long break
>from it. It is challenging to get back into but satisfying as well.
I am so swamped that I don't have any time to learn Java. This is bad,
but I don't know what I can drop to free up time (sigh).
>Must be off, many thanks for your help. I will let you know when I am
>coming through in May, I am just waiting for the official stamp of
>approval at the moment.
Excellent! Talk to you soon.
Tom