Subject: lib/401: can't compile curses program with c++
To: None <gnats-admin>
From: James Jegers <jimj@enigma.cs.uwm.edu>
List: netbsd-bugs
Date: 08/08/1994 12:05:07
>Number:         401
>Category:       lib
>Synopsis:       can't compile curses program with c++
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug  8 12:05:05 1994
>Originator:     James Jegers
>Organization:
"	"
>Release:        
>Environment:
	
System: NetBSD enigma.cs.uwm.edu 1.0 beta ENIGMA#1 i386


>Description:
	
      The header file does not have __BEGIN_DECLS and __END_DECLS around
      the function prototypes.  You therefor cannot compile a program
      with the c++ compiler that uses curses.
>How-To-Repeat:
	
	<how to correct or work around the problem, if known (multiple lines)>

%m %/-> more i.c
#include <curses.h>

main()
{
   initscr();
}


K%m %/-> c++ i.c 
...cc0002861.o: Undefined symbol `_initscr__Fv' referenced from text segment
%m %/-> c++ i.c -lcurses -ltermcap
...cc0003351.o: Undefined symbol `_initscr__Fv' referenced from text segment
%m %/-> cc i.c -lcurses -ltermcap
%m %/->

>Fix:
  FIX: Put the __*_DECLS around the prototypes in curses.h

>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------