🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #11

Re: Problems with g++

#11
From: Warwick Allison
Date: Tue, 27 Oct 1992 05:10
28 lines
1454 bytes
cnhasan@casbah.acns.nwu.edu (Nirmal Hasan) writes:

>My sys adm recently installed gcc/g++ 2.2.2 on sparc IPC. When I try
>compiling my C++ programs with g++, I get error messages like 

>/usr/include/stdio.h:61 too many arguments to function "char * sprintf()"


The problem is that you are using the system header files (those in
/usr/include), which do not support prototypes on your system.  In those
headers, sprintf() is defined with:

	extern char     *sprintf();

ie. No parameters, since that is what is done with ugly old K&R C compilers.
My guess is that the install failed because it was trying to write to
/usr/include.  Unfortunately, I haven't done an install of 2.2.2, so I
can't give details of how to fix this.  Just look around for the string
"/usr/include" in the configuration files.


--
Warwick
--
  _-_|\      warwick@cs.uq.oz.au            /Disclaimer:
 /     * <-- Computer Science Department,  /  
 \_.-._/     University of Queensland,    /   C references are NULL && void*
      v      Brisbane, Australia.        /  
Technical Details
Message-ID: <10807@uqcspe.cs.uq.oz.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
References: <1992Oct24.003844.27826@news.acns.nwu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
From: warwick@cs.uq.oz.au (Warwick Allison)
Newsgroups: gnu.g++.help
Subject: Re: Problems with g++
Message-ID: <10807@uqcspe.cs.uq.oz.au>
Date: 27 Oct 92 05:10:59 GMT
References: <1992Oct24.003844.27826@news.acns.nwu.edu>
Sender: news@cs.uq.oz.au
Reply-To: warwick@cs.uq.oz.au
Lines: 28