gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] Fw: make error


From: Scott McKellar
Subject: [open-cobol-list] Fw: make error
Date: Thu, 8 Jan 2015 18:30:08 -0800

Short answer:

Install the development package for ncurses, then try again.  Or, build 
gnuCOBOL v2.0 instead of v1.1; I don't think that v2.0 suffers from this 
problem.


Long answer, which will be useful only if you know enough C to make some simple 
code changes:

The build uses conditional compilation to compile one or another set of 
functions, depending on whether some version of curses is available (which for 
Kubuntu would be ncurses).

If curses is available, it compiles some functions built on curses.  If curses 
is not available (not only the libraries but also the header file), or if you 
configure the build not to include curses, it builds dummy versions of the same 
functions -- versions that don't do anything because they can't call curses.

The problem is that two of these dummy functions don't have the same signature 
as the real functions, and the compiler complains.

Look at libcob/screenio.c.  You'll find two versions of cob_field_accept().  
The real version takes seven parameters.  The dummy version, with an empty 
function body, takes only six parameters.  Likewise for cob_field_display().

If you really don't want to use curses for some reason, then change the dummy 
versions so that they take the same parameter lists as the corresponding real 
functions.  Then redo the build.

This problem has been reported several times over the years.  It looks like an 
easy fix, and I don't know why no one has ever fixed it.


Scott McKellar

----- Forwarded Message -----
From: Peter Nacken <address@hidden>
To: address@hidden 
Sent: Thursday, January 8, 2015 5:24 AM
Subject: Re: [open-cobol-list] make error


On Thu, 8 Jan 2015 12:19:55 +0100
Peter Nacken <address@hidden> wrote:

> Hi,
> 
> I get the error below when I use make.
> 
> In file included from ../libcob.h:33:0,
>                  from screenio.c:57:
> ../libcob/common.h:1081:17: note: previous declaration of 'cob_field_display' 
> was here
>  COB_EXPIMP void cob_field_display (cob_field *, cob_field *, cob_field *,
>                  ^
> screenio.c:1413:1: error: conflicting types for 'cob_field_accept'
>  cob_field_accept (cob_field *f, cob_field *line, cob_field *column,
>  ^
> In file included from ../libcob.h:33:0,
>                  from screenio.c:57:
> ../libcob/common.h:1084:17: note: previous declaration of 'cob_field_accept' 
> was here
>  COB_EXPIMP void cob_field_accept (cob_field *, cob_field *, cob_field *,
> 
> any idea how to solve it
>

Sorry I forgot. I try it on Kubuntu 14.10. 

Peter
> 
> 
> -- 
> Peter Nacken <address@hidden>
> 
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list





-- 
Peter Nacken <address@hidden>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list


reply via email to

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