Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linking problem with Fujitsu COBOL85 software...

213 views
Skip to first unread message

Sumanta Khan

unread,
Dec 26, 2002, 12:24:14 PM12/26/02
to
I recently downloaded COBOL85 V30L10, Fujitsu Limited software from
www.download.com and was trying to run a small COBOL program.
Compilation went okay, but, it failed while linking ("LINK : fatal
error LNK1561: entry point must be defined"). Can anybody tell me what
I will have to do ? FYI, I have Windows Millennium. Please Cc your
reply to Khan_S...@hotmail.com
Thanks in advance.
Sumanta Khan
-----------------------------
000020 IDENTIFICATION DIVISION.
000030 PROGRAM-ID. Fickle.
000040 AUTHOR. Sumanta Khan.
000110 ENVIRONMENT DIVISION.
000120 DATA DIVISION.
000130 WORKING-STORAGE SECTION.
000140 01 RunningTotal PIC 9(4) VALUE 150.
000190 PROCEDURE DIVISION.
000210 ADD 1 TO RunningTotal.
000220 DISPLAY "The total so far is " RunningTotal
000240 STOP RUN.
------------------------------
NMAKE : fatal error U1077: 'C:\FSC\PCOBOL32\LINK' : return code '0x68'
Stop.

Microsoft (R) 32-Bit Incremental Linker Version 3.00.5270
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

/OUT:C:\akhan\EDS\COBOL\Fuj.exe
C:\akhan\EDS\COBOL\Fujitsu.OBJ
C:\FSC\PCOBOL32\PROJECT.RES
C:\FSC\PCOBOL32\F3BICIMP.LIB
C:\FSC\PCOBOL32\LIBC.LIB
C:\FSC\PCOBOL32\KERNEL32.LIB
C:\FSC\PCOBOL32\USER32.LIB
LINK : fatal error LNK1561: entry point must be defined
Linking files ended.
Please close the window.

Alistair Maclean

unread,
Dec 26, 2002, 2:25:08 PM12/26/02
to
Would somebody tell me to get a life as I shouldn't be doing this on
Boxing Day...

The manual does not list the U1077 error but does contain the following
explanation of LNK1561:

LNK1561
Explanation:
An attempt was made to create an executable program (EXE) by compiling
the main program without the compiler option MAIN. Operator response:
Specify the compiler option MAIN before compiling the main program.


What this means is that you have not told the compiler whether the
compilation is for a standalone EXE (ie MAIN) or a called program. Stick
@MAIN in as the first line of code, eg:

000100 @OPTIONS MAIN, APOST
000200 IDENTIFICATION DIVISION.

In article <7d7c0707.02122...@posting.google.com>, Sumanta
Khan <Khan_S...@hotmail.com> writes

--
Alistair Maclean

For his mother was Coincidence, and his father was Chaos.
- Stanislaw Lem

Richard

unread,
Dec 26, 2002, 5:42:25 PM12/26/02
to
Khan_S...@hotmail.com (Sumanta Khan) wrote

> "LINK : fatal error LNK1561: entry point must be defined").

On the Fujitsu web site under 'Support' the first item highlighted in
red is:

"Most common error when first using Fujitsu COBOL:
Link: fatal error: entry point must be defined - set the compiler
options to MAIN before compiling your program."

Charles Hottel

unread,
Dec 26, 2002, 5:56:19 PM12/26/02
to
Get a life! ;-)

Alistair Maclean <alis...@ld50macca.demon.co.uk> wrote in article
<Sr53vAAU...@ld50macca.demon.co.uk>...

R. Hendriks

unread,
Dec 27, 2002, 4:29:06 AM12/27/02
to
Add a line before the first one:

@OPTIONS MAIN(WINMAIN) or @OPTIONS MAIN(MAIN)

that's a way of setting the program as a main program.

From the Fujitsu manuals:

Specify MAIN to use a COBOL source program as a main program;

specify NOMAIN to use a COBOL source program as a subprogram.

MAIN(WINMAIN):

Specify this when you use a console window created by COBOL

for the input/output target of an ACCEPT statement or DISPLAY

statement, and when you use a message box for the output target

of an error message at execution time.

MAIN(MAIN):

Specify this when you use the system console (command prompt

window) for the input/output target of ACCEPT statement,

DISPLAY statement and error message at execution time.

If only MAIN is specified, it is handled as MAIN(WINMAIN).

"Richard" <rip...@Azonic.co.nz> wrote in message
news:217e491a.02122...@posting.google.com...

Richard

unread,
Dec 27, 2002, 3:15:19 PM12/27/02
to
"R. Hendriks" <R.Hend...@uvt.nl> wrote

>> I recently downloaded COBOL85 V30L10,

> Add a line before the first one:


>
> @OPTIONS MAIN(WINMAIN) or @OPTIONS MAIN(MAIN)

Note that for Version 3 the parameter is not valid, the only way this
should be specified is as MAIN and not as MAIN(something) which is
only appropriate to later versions.

Sumanta Khan

unread,
Dec 28, 2002, 1:40:31 PM12/28/02
to
rip...@Azonic.co.nz (Richard) wrote in message news:<217e491a.02122...@posting.google.com>...
-----------
Thanks to everyone.
Finally, I compiled it with the option MAIN and it got link-edited,
executed okay. Thanks very much for all the help.
Regards
Sumanta Khan

Alistair Maclean

unread,
Dec 28, 2002, 2:45:56 PM12/28/02
to
In article <01c2ad31$e3b83c20$6ac2f943@chottel>, Charles Hottel
<cho...@cpcug.org> writes

>Get a life! ;-)
>
>Alistair Maclean <alis...@ld50macca.demon.co.uk> wrote in article
My gratitude to you, sir.
0 new messages