rfg@NCD.COM (Ron Guilmette) (07/21/90)
In article <C+Y$7+-@rpi.edu> pattersw@cs.rpi.edu (William Patterson) writes: > >Does anyone know what's reqired to get X windows programs (using >athena widgets) to compile using g++? > >I tried it on an example (no C++ code) X program written in standard >C, with no luck. The program compiles fine with cc. > >I tried : g++ filename.cc -ansi -lXaw -lXmu -lXt -lXext -lX11 >and : g++ filename.cc -traditional -lXaw -lXmu -lXt -lXext -lX11 > >Both produced compile errors. >Anybody have any suggestions? Yep. See below. // Ron Guilmette // C++ Entomologist // Internet: rfg@ncd.com uucp: ...uunet!lupine!rfg // Motto: If it sticks, force it. If it breaks, it needed replacing anyway. ----------------------------------------------------------------------------- Protoize/Unprotoize ------------------- This is a brief announcement concerning to two free software tools called protoize and unprotoize. Protoize is a tool to assist in the conversion of old-style (K&R) C code to new-style ANSI C code or C++ code (with function prototypes). Unprotoize is a tool to assist in the conversion of new-style ANSI C code to old-style (K&R) C code without function prototypes. Neither of these tools claims to do a complete conversion (there are too many sniggling little incompatabilities) however the bulk of the work (usually more than 90%) in such conversions usually involves function prototypes. This is the part of the job that protoize & unprotoize can perform automatically (leaving you to contend only with the remaining sniggling details). The Protoize and Unprotoize tools have been built specifically for doing these types of conversions on LARGE systems of C source code. They are fairly intelligent and are able to perform conversions of both function definitions and function declarations, and they can do so over entire groups of source files at a time. Protoize can use information gleaned from one source file to update other source files. This capability is most useful when one wants one's include files to contain ANSI C (and/or C++) function prototypes. Protoize is able to automagically insert such prototypes into .h files based upon information it gets from your .c files. Likewise, extern function declarations appearing in one .c file will be converted to prototype form based upon information gathered from the actual function definitions in the same .c source file, or in other .c files. Protoize can also be used with your system's native "source flavor" lint libraries to generate a complete set of fully prototyped "system" include files. Such a set can be useful for catching more function calling errors at compile time. Protoize and unprotoize work in conjunction with the GNU C compiler (GCC) which is used as a front-end information gathering tool. In order to build or use protoize or unprotoize you must also build and use GCC. Protoize, Unprotoize, and GCC are owned and operated by the Free Software Foundation. They are available to all under the terms and conditions of the GNU Public Licence, a copy of which is provided with the source code for GCC. Availability ------------ Protoize/Unprotoize version 1.07 and is now available for anonymous FTP from ics.uci.edu. Size of the protoize-1.07.Z file is 89135 bytes. Protoize/Unprotoize 1.07 can also be obtained via anonymous UUCP from osu-cis. (Contact for UUCP transfer is Karl Kleinpaste <karl@cis.ohio-state.edu>). (European availablity of protoize/unprotoize is described below). On ics.uci.edu, protoize/unprotoize 1.07 can be found as: ~ftp/pub/gnu/protoize-1.07.Z ~ftp/pub/gnu/protoize-1.07.93.Z (Note: These pathnames are speculative. I believe that this is where these files reside now, but I an no longer at UCI so I don't know for sure. I know that they were moved around the time I left.) Version 1.07 is dramatically better than previous versions. Substantial improvements have been made in robustness and ease-of-use. If you tried protoize/unprotoize before and didn't like them, please try them again. You may be plesantly surprized. This version has been pre-tested by several people on a number of different machines and is belived to be quite portable and reasonably bug free. (My special thanks to all the pre-testers!) As with prior versions, the distribution file is a compressed *patch* file (not a tar file) which should be applied to a pristine set of GCC Version 1.36 source files. (The file protoize-1.07.93.Z is also available for those users now pre-testing GCC 1.36.93. Size is 89029 bytes. That version should also be used for GCC 1.37 until I have a chance to create another patch file just for that version of GCC.) The application of the protoize/unprotoize patches will result in the creation of several new files. Among these "additions" are the file README_PROTOIZE and a common pre-man-page file called proto-unproto.1. The latter file will be preprocessed into two man-page files (called protoize.1 and unprotoize.1) by the (modified) Makefile during a normal build of the (modified) GCC. Because so many things have changed in this version, it is strongly advised that you read the README_PROTOIZE file and the man pages again, even if you have already been using prior versions of protoize/unprotoize. As before, I welcome comments, suggestions, bug reports and (especially) compliments. User suggestions have been the major source of ideas for new features up till now, and I'll try to be receptive if you have a new idea for an additional feature. Please let me know if you use these tools to do a conversion on any large (i.e. >= 100k lines of code) system. Note that when using protoize 1.07 you may occasionally get messages like: please add `extern foobar()' to SYSCALLS.c These messages are an indication that your native "system" include files are not yet in fully prototyped form. For now, you should just ignore these messages. I am now developing a plan whereby protoize will be able to auto- magically create protoized versions of system include files for a variety of systems. This scheme will probably make its debut in v1.08. After that, we can all (finally) get totally protoized. (This will also be a major benefit for C++ users.) ----------------------------------------------------------------------------- European Availability: Two sites are distributing protoize-1.07.Z in Europe: Protoize-1.07.Z can be retrieved by anonymous ftp from mizar.docs.uu.se (130.238.4.1). Contact is Ove Ewerlid <ewerlid@mizar.docs.uu.se>. The files are located in: ~ftp/pub/gnu/protoize-1.07.Z ~ftp/pub/gnu/protoize-1.07.93.Z (Thanks Ove!) --------------------------------------------------------------------- Rijks Universiteit Utrecht (Utrecht University, Department of Computer Science). Contact is Edwin Kremer <edwin@cs.ruu.nl>. It may be obtained either via anonymous FTP or by mail, as follows: * Anon FTP: System: sol.cs.ruu.nl [131.211.80.5] Files: ~ftp/pub/GNU/protoize-1.07.Z ~ftp/pub/GNU/protoize-1.07.93.Z * Mail Server: European sites not having FTP access may retrieve it from the Rijks Universiteit Utrecht by sending an email message to <mail-server@cs.ruu.nl> with contents path <your_valid_return_address> btoa send GNU/protoize-1.07.Z end Leave out the line with "btoa" if you prefer uuencoding. Please use a domain-based return address, or you may loose out. -- // Ron Guilmette // C++ Entomologist // Internet: rfg@ncd.com uucp: ...uunet!lupine!rfg // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.
daniel@osf.org (Daniel Dardailler) (08/16/90)
>Does anyone know what's reqired to get X windows programs (using >athena widgets) to compile using g++? ... >Both produced compile errors. >Anybody have any suggestions? You might want to apply the official MIT fixes. It was bogus (experimental in fact) on the original January tape. Now it works fine for Xt and Xlib (and Motif :-), I don't know about Athena. Daniel Dardailler | OSF/Motif Team Open Software Foundation | Email : daniel@osf.org 11 Cambridge Center | Phone : (617) 621 8840 CAMBRIDGE, MA 02142 | Fax : (617) 621 0584 PS: You don't need to use Protoize for this purpose.