gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Something not right when running a simple program with


From: Roger While
Subject: [open-cobol-list] Something not right when running a simple program with "cobcrun"
Date: Sat, 02 Aug 2008 10:37:57 +0200


Lawrence, can you please inform your provider that all attempts
to contact you at your address fail -
Connected to 76.96.62.116 but greeting failed.
Remote host said: 554 IMTA27.westchester.pa.mail.comcast.net comcast 213.198.55.74 Comcast BL004 Blocked for spam. Please see http://www.comcast.net/help/faq/index.jsp?faq=SecurityMail_Policy18628

I do, as a matter of coutesy, cc the originator.
The above is not acceptable.

Anyway, to the problem.
The message is somewhat wrong under Cygwin (reproducable)
Under Posix systems you would get -
undefined symbol: HelloWorld

You have to understand the relationship between the source
name and the PROGRAM-ID.

The PROGRAM-ID is the entry point to the prog.
ie.
  CALL "Hello"
is VERY different to
  CALL "HELLO"

So, to take your example, you have a PROG-ID of
"HELLOWORLD".
So, make your source file also HELLOWORLD.cob and
everything will work.

Now, you ask, why does it work with "-x". Simple, because
we generate a "main" function that directly calls the code.

cobcrun is, in this aspect, no different to calling (via CALL) another
prog.
What we (and other compilers do) is to try to satisfy the reference to
external names based firstly on their name.

OK, you may ask but why does this work with MIcroFcous.
Simple, MF automatically defines an entry point based on the
source file name (wrongly, and still in latest releases).
I considered this aspect some time ago and discarded this as dangerous
and not conforming to standard.

Roger




reply via email to

[Prev in Thread] Current Thread [Next in Thread]