A GUI for GCC

A GUI for GCC

Post by Wai W » Wed, 21 Oct 1998 04:00:00



I am trying to write a GUI for GCC. Is the GCC source code available for
download? I need it to integrade it output message to the GUI front end.

Wai Wu

 
 
 

A GUI for GCC

Post by Brian Wheel » Wed, 21 Oct 1998 04:00:00




Quote:> I am trying to write a GUI for GCC. Is the GCC source code available for
> download? I need it to integrade it output message to the GUI front end.

> Wai Wu

        Yes, it is available (pretty much everywhere).  Why do you
need it, though?  Can't you just catch the output of gcc without modifying
gcc?  

Brian Wheeler


 
 
 

A GUI for GCC

Post by Wai W » Wed, 21 Oct 1998 04:00:00


I can catch the output for sure. But I want the output in binary format, so I
will be able to track down the names of the files and line numbers. When the
user clicks on the error message, the editor will so the file name seek to
line of error.



> > I am trying to write a GUI for GCC. Is the GCC source code available for
> > download? I need it to integrade it output message to the GUI front end.

> > Wai Wu

>         Yes, it is available (pretty much everywhere).  Why do you
> need it, though?  Can't you just catch the output of gcc without modifying
> gcc?

> Brian Wheeler


 
 
 

A GUI for GCC

Post by Wai W » Wed, 21 Oct 1998 04:00:00


It probably wouldn't be necessary if the ERROR and WARNING message comes in a
predefined format (e.g.  file_name line_number description), because that is
easy to parse



> > I am trying to write a GUI for GCC. Is the GCC source code available for
> > download? I need it to integrade it output message to the GUI front end.

> > Wai Wu

>         Yes, it is available (pretty much everywhere).  Why do you
> need it, though?  Can't you just catch the output of gcc without modifying
> gcc?

> Brian Wheeler


 
 
 

A GUI for GCC

Post by Brian Wheel » Wed, 21 Oct 1998 04:00:00




Quote:> It probably wouldn't be necessary if the ERROR and WARNING message comes in a
> predefined format (e.g.  file_name line_number description), because that is
> easy to parse

        Hm.  I always thought it was:
filename: In (method|function|...) `name of thing`:
        for giving some context and
filename:line: message
        for warnings/errors, etc.  You could ignore the contexts, since
they're not important for you to jump to...

        patching the compiler to work with a GUI front end isn't good...
because there are many people who would rather not have to rebuild their
compiler just to use a different environment.

emacs is doing coloring of the messages, so maybe if you looked at how
it handles output, you can borrow it to use for jumping on click.

Brian Wheeler




>> > I am trying to write a GUI for GCC. Is the GCC source code available for
>> > download? I need it to integrade it output message to the GUI front end.

>> > Wai Wu

>>         Yes, it is available (pretty much everywhere).  Why do you
>> need it, though?  Can't you just catch the output of gcc without modifying
>> gcc?

>> Brian Wheeler


 
 
 

A GUI for GCC

Post by Przemek Klosowsk » Wed, 21 Oct 1998 04:00:00



> I can catch the output for sure. But I want the output in binary format, so I
> will be able to track down the names of the files and line numbers. When the
> user clicks on the error message, the editor will so the file name seek to
> line of error.

I think you want to work too hard. GCC is producing standard error messages,
designed to be easily parsed. Emacs, for instance, has a mode to compile
using gcc, which captures errors and jumps to the source file and line
for each one. You probably should have a look at this file if you don't
want to reinvent the wheel (/usr/share/emacs/20.2/lisp/compile.el)

--

                        NIST Center for Neutron Research (bldg. 235), E111
                        National Institute of Standards and Technology
                        Gaithersburg, MD 20899,      USA
                        .. and for spam extractors, FCC Commisioners' email is:

 
 
 

A GUI for GCC

Post by Andi Klee » Wed, 21 Oct 1998 04:00:00



> It probably wouldn't be necessary if the ERROR and WARNING message comes in a
> predefined format (e.g.  file_name line_number description), because that is
> easy to parse

They come in a predefined format. All GNU development tools (gcc, binutils,
bison etc.) use:

<filename>:<line>:<column> Error message

The column field is optional and not outputted by some programs (e.g.
gcc). The format is very easy to parse as demonstrated in dozens of IDEs,
editors etc. I don't think that you need to patch gcc at all.  

-Andi

 
 
 

A GUI for GCC

Post by James Youngm » Wed, 21 Oct 1998 04:00:00



> I am trying to write a GUI for GCC. Is the GCC source code available for
> download? I need it to integrade it output message to the GUI front end.

Start by taking a look at RHIDE and XWPE.

--

 
 
 

A GUI for GCC

Post by Stefaan A Eecke » Thu, 22 Oct 1998 04:00:00




> It probably wouldn't be necessary if the ERROR and WARNING message comes in a
> predefined format (e.g.  file_name line_number description), because that is
> easy to parse




>> > I am trying to write a GUI for GCC. Is the GCC source code available for
>> > download? I need it to integrade it output message to the GUI front end.

>>         Yes, it is available (pretty much everywhere).  Why do you
>> need it, though?  Can't you just catch the output of gcc without modifying
>> gcc?

Check out vim and elvis, they allow you to call make from
within the editor, and capture the output from the compilation
process. You can then jump from one error (or warning) to the
other. As a matter of fact, vim is almost a GUI frontend
(it has an X mode, and you can make your own menu-bar through
a .vimrc file in the development directory).

--
Stefaan
--

PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
Perfection is reached, not when there is no longer anything to add,
but when there is no longer anything to take away. -- Saint-Exupry

 
 
 

A GUI for GCC

Post by Wai W » Thu, 22 Oct 1998 04:00:00


Thanks to all your input. What I really want to build is something a.k.a VB for a
known C++ compiler for Linux. I am already working on the GUI stuff.



> > It probably wouldn't be necessary if the ERROR and WARNING message comes in a
> > predefined format (e.g.  file_name line_number description), because that is
> > easy to parse




> >> > I am trying to write a GUI for GCC. Is the GCC source code available for
> >> > download? I need it to integrade it output message to the GUI front end.

> >>         Yes, it is available (pretty much everywhere).  Why do you
> >> need it, though?  Can't you just catch the output of gcc without modifying
> >> gcc?

> Check out vim and elvis, they allow you to call make from
> within the editor, and capture the output from the compilation
> process. You can then jump from one error (or warning) to the
> other. As a matter of fact, vim is almost a GUI frontend
> (it has an X mode, and you can make your own menu-bar through
> a .vimrc file in the development directory).

> --
> Stefaan
> --

> PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
> ___________________________________________________________________
> Perfection is reached, not when there is no longer anything to add,
> but when there is no longer anything to take away. -- Saint-Exupry

 
 
 

A GUI for GCC

Post by Frank Sweetse » Thu, 22 Oct 1998 04:00:00



> It probably wouldn't be necessary if the ERROR and WARNING message comes in a
> predefined format (e.g.  file_name line_number description), because that is
> easy to parse

it is.  read the GNU coding standards paper, it descripes the standard GNU
error message format.

--
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net | PGP key available
paramount.ind.wpi.edu RedHat 5.1   kernel 2.1.125   i586 | at public servers
That wouldn't be good enough.

 
 
 

A GUI for GCC

Post by James Youngm » Fri, 23 Oct 1998 04:00:00



> I can catch the output for sure. But I want the output in binary format, so I
> will be able to track down the names of the files and line numbers. When the
> user clicks on the error message, the editor will so the file name seek to
> line of error.




> > > I am trying to write a GUI for GCC. Is the GCC source code available for
> > > download? I need it to integrade it output message to the GUI front end.

> > > Wai Wu

> >         Yes, it is available (pretty much everywhere).  Why do you
> > need it, though?  Can't you just catch the output of gcc without modifying
> > gcc?

That's what sscanf() is for.

--

 
 
 

A GUI for GCC

Post by David M. Co » Sun, 25 Oct 1998 04:00:00



Quote:>Thanks to all your input. What I really want to build is something a.k.a
>VB for a known C++ compiler for Linux. I am already working on the GUI stuff.

The Glade folks could probably use some help.  Glade is a GUI designer for
GTK that outputs XML.  This can then be converted into various languages.

There are already plenty of IDEs for Linux and even more in the works (such
as gIDE.)

See www.gnome.org for more info.

Dave Cook