Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I m working on c editor project, my que is "how to provide compiler and debugger for my ide ?"

Plz help me.. Thanks you..
Posted

You could execute an external compiler (like NMake), and even a debugger. I suspect you'll find info on google with the appropriate search phrase.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Feb-11 11:33am    
That's correct, my 5, but the main topic here is stdout/stderr redirection. I tried to answer, please see.
--SA
CPallini 16-Feb-11 15:36pm    
I don't think stdout/stderr redirection is the main topic. :-)
Sergey Alexandrovich Kryukov 16-Feb-11 19:28pm    
Well, a matter of taste. This is the key that stops some. Maybe I stressed it's value because when I needed to create my own IDEs (and also UI-based Console replacement, which is not trivial at all), I had very polished process of UI development buy I was new to re-direction stuff.
--SA
CPallini 16-Feb-11 15:36pm    
Good answer, my 5.
Providing a compiler is relatively easy. You need to use System.Diagnostics.Process to span a process running a compiler. Main thing you need to do is to re-direct stdout and stderr streams to the streams created by your program. In this way you will be able to present errors and compiler output to your controls. See Process.StandardError, Process.StandardOutput.

Again, this is feasible. This is how I started Java development and even .NET development before I got Visual Studio.NET: created my own editor with redirection of compiler streams.

Please see more detail my new Answer to a similar Question, where I put more details based on my Answers on different questions: invoking compiler from our application[^].

—SA
 
Share this answer
 
v3
Comments
Espen Harlinn 16-Feb-11 14:55pm    
Good answer, my 5
Sergey Alexandrovich Kryukov 16-Feb-11 19:47pm    
Thank you.
--SA
JF2015 17-Feb-11 0:58am    
Helpful information. Great!
To see a 'live' example of SAKryukovs' answer - take a look at:
#develop (short for SharpDevelop) is a free IDE for C#, VB.NET and Boo projects[^]

If you are working on an IDE - looking at a successful implementation could be quite useful - good luck :)

Regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 16-Feb-11 15:34pm    
Great, thank you for supporting me. I advised this software recently in reply to some other question (on Intellisense or something like that). The only problem is that the code is pretty big.
5 for your Answer.
--SA
Espen Harlinn 16-Feb-11 15:45pm    
It’s also a tremendous learning experience, the project leverages many interesting parts of the core .Net functionality – even if you don’t dig to deep into all its parts, you can acquire an abundance of practical knowledge about the workings of .Net.
Sergey Alexandrovich Kryukov 16-Feb-11 19:23pm    
I know; few years ago I found and used docking UI from this work (needed some patches from me).
However, I worked quite a bit at my own IDEs, that's why I'm familiar with CreateProcessEx based technique. One of such works is my experimental Computer Algebra System engine with IDE-like fron-end.
--SA
JF2015 17-Feb-11 0:58am    
References to #Develop are always deserving a 5!
Sergey Alexandrovich Kryukov 25-Feb-11 20:45pm    
Update: added a reference to my more detained Answer (last sentence).
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900