hello all..,

can i use c++ libraries and the compiler to create my own interface?
i just want to use a different gui for it..
a new editor of sorts.if yes then how do i go by it?
thanks..

Recommended Answers

All 15 Replies

your own interface for what?

wel i wanna make a gui of my own for writing c++ code on windows..

Oh ok you are trying to say:

1. A gui for the c++ code editor, which highlights or changes the color of the keywords.

2. And then when the code is finished, you can compile using an SDK kind of thing.

I haven't done this before but I will be very interested in answer as well.

Writing an entire operating system to generate your own brand of windows would be possible with C++, but it would take extensive knowledge of both how operating systems work as well as how current gui's work, whether written with C, C++ or some other language.

Creating your own text editor that can highlight fragments of text based on certain criteria should also be possible. It would, arguably, be easier than writing your own operating system, but it would still be a prodigious task.

Either project is likely to be done using multiple authors instead of a single individual, but if you've got the time an energy, then it is probably doable. Have I done it, no. Do I think it doable, yes. How would I proceed---by testing/expanding my knowledge base on less strenuous projects first and ask/look for information about how other people/groups may have done the same task before (I'd start by Googling the topics I thought might be helpful).

@lerner
well is it that difficult to proceed as you mention?
all i want is a windowed editor,you can call it a "front end" of sorts..
all the background processes proceed just as the turboc++ but the only difference is i have a better looking place to write c++ code.

@OP

Are you trying to create a text/code editor? Try using Qt. You can use a simple text area + menu interface.

@OP

Are you trying to create a text/code editor? Try using Qt. You can use a simple text area + menu interface.

the framework is fine but how do i go about linking the editor to the actual thing?

If all you want is an editor then use Notepad++. It has the features, and more, than you want.

Hmm heres a thought:

Assume you are compiling using gcc.
On click of a meny button, try calling system ( "cc filename" ); ?

im not sure if this works, but invoking the compiler from the editor must not be a problem i guess, though i dont know how to.

>>invoking the compiler from the editor must not be a problem

Not at all, afterall both Code::Blocks and VC++ do it, and both of those are nothing more than editors that invoke the compilers.

>>invoking the compiler from the editor must not be a problem

Not at all, afterall both Code::Blocks and VC++ do it, and both of those are nothing more than editors that invoke the compilers.

yes i do know the existance of notepad++,code blocks,vc++,devcpp etc and thats exactly the kind what im lookin for.this is just an academic curiosity as i want to know how it works.

@Ancient Dragon

Just out of curiosity. How is the compiler invoked from the editor(as in VC++)? i tried thinking about it, but all i could think of use system().

Also, that would answer the OPs question as well, since creation of an editor has already been answered.

Here's my understanding. The program code I write is done within a text editor inside of an IDE (Integrated Development Environment). I just push a button and the code is compiled. Well, it's actually preprossed, then compiled and then linked, or something like that, but most people just say it's compiled. However, you can write code in any text editor and use command line processing instead of the default IDE to get the source code file you write into the compiler and let it do it's stuff. To open the g++ compiler from the command line and get it to process a file called filename, I believe the command used is:

C> g++ filename

where C> is the C prompt command line, g++ is the name of the compiler program and filename is the name of the source code file to compile. The source code file you want to compile, filename, can be typed using (just about) any text editor you want. There are a whole passel of other command line options that are available for if you want to do it that way.

I suspect that within the IDE when I push the compile button it "saves" the text I've typed in a source code file someplace (without the annoying "do you want to save this file" message box I get when I want to store a document I've created with Notepad or whatever) and internally sends off a call to start the compile process using a default sequence of options that I could have written on the command line if I'd have wanted to do that. I believe that within most IDEs there is an area of options/settings where you can change the stuff you want to get done, but I'm not a sophisticated enough programmer to use things other than the default settings anyway so I never venture there, though you're welcome to explore if you want.

The java compiler supports something called 'compiler API' one of my friend wrote
a small IDE using swing classes in the previous semester.If this is related to
java compiler I could ask him an tell you how to.And pleasure.

And about gcc toolchian there is something I heard 'gcc plugins' that it allows you
to access to the internals of the gcc compilers , even you can read the symbol table,
syntax tree and do many more.

Actually I'm also can say I don't know and looks like above guys also unable to
prompt you to information. Mark this thread as open therefore we someone could
come with a best answer/resources. if someone unable to slove this withing next
48 hours you could ask this in comp.compilers .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.