PDA

View Full Version : Qt Creator and plain C project without compiling



elusive
15th October 2014, 14:31
Please help me to install Qt Creator correctly to use it as simply text editor (like it).

My project: C language, without any frameworks. Without building and compiling (will do in another IDE).

Which components should I click when installation master of free Qt Creator asks? I checked IDE but all ticks from other components switched off (to minimize memory volume).
After that when I tried to create new project

New Project -> Non-Qt project -> Plain C Project (Creates a plain C project using qmake, not using the QT library) -> Choose... -> set URL ->

I got "No valid kits found".

I tried to add version by Tools -> Options -> Build&Run -> QT Versions (currently empty) -> Add -> and obviously no qmake.exe files existed.

Is it possible somehow to create a project without installing components? I need only a project tree, SRV and editor.
If not, how can I install QT Creator in minimalistic way (only to provide qmake.exe file to the project wizard as it asks). I tried to leave some ticks as they were set by default, but in that case installation downloaded so much files from the Internet that I aborted the process (limited in downloading megabytes)...

Brandybuck
15th October 2014, 20:34
You need a kit, but a kit does not require Qt. Just set a compiler and debugger, and choose "None" for Qt version. Voila!

elusive
16th October 2014, 06:24
You need a kit, but a kit does not require Qt. Just set a compiler and debugger, and choose "None" for Qt version. Voila!

The thing is that I am not going to compile and debug in Creator. Does I need to set it anyway?
Which components can I check in installation for minimalistic installation?

By default it is:
10668

What can I discard? All of this download too much...

ChrisW67
16th October 2014, 20:36
There is a Qt Creator only download runnig 70-90MB depending on platform.
http://qt-project.org/downloads

You are, presumably, going to compile this program somehow so you must have a C compiler and debugger you can point Qt Creator at to keep it happy (even if you never use it). If you don't what to use Qt then creating a project that depends on qmake will not work. The File menu allows you to create new source files completely independent of any project creation wizard.

wysota
16th October 2014, 21:20
I think a feasible option is to use the option to import an existing non-qmake project.

elusive
17th October 2014, 13:10
There is a Qt Creator only download runnig 70-90MB depending on platform.
http://qt-project.org/downloads

You are, presumably, going to compile this program somehow so you must have a C compiler and debugger you can point Qt Creator at to keep it happy (even if you never use it).

I am going to compile the project outside QtCreator - it doesn't support the Compiler that I need. In IDE that support this compiler text editor is very very poor....
In the end I left only MinGW and IDE, installed and managed to create the project in the end. Thank you!

Still another issue arose... I am not sure that I can post another question in another branch, but still probably you can help me.
Compiler that I need has additional to normal-C keywords (special for microprocessor). QtCreator's compiler surely not and it markes half of the text as wrong. It is inconvenient.

Is it possible to tune MinGW compiler so that it won't mark a specified list of words? Or add to it somehow 'adds' from another compiler?...

wysota
17th October 2014, 13:28
I am going to compile the project outside QtCreator - it doesn't support the Compiler that I need.
What is that compiler by the way? Creator doesn't really care what compiler you use, it just calls make and parses the compiler output so you can practically attach any compiler that you want to it.


Still another issue arose... I am not sure that I can post another question in another branch, but still probably you can help me.
Compiler that I need has additional to normal-C keywords (special for microprocessor). QtCreator's compiler surely not and it markes half of the text as wrong. It is inconvenient.
Qt Creator does not have any "compiler", it only has a code model parser which obviously parses the C dialect it understands. For imported projects there is a project.defines file where you can add custom directives Creator will "understand", so if you have a 'mycustomkeyword' keyword, you can add the following line to that file:


#define mycustomkeyword
and Creator will stop underlining it as unknown. However if this keyword has arguments Creator might still complain about the language grammar.

Brandybuck
17th October 2014, 19:13
If you are only going to use Qt Creator as a text editor, then simply open the file you want to edit. Qt Creator should not grumble unless you try to do any project related things.

d_stranz
18th October 2014, 22:45
If all you want is a text editor that understands C indentation and so forth, then use Notepad++ (http://notepad-plus-plus.org/) and add any plugins (http://npp-wiki.tuxfamily.org/index.php?title=Plugin_Central) you might want to enhance it. A whole lot easier than using QtCreator as simply a text editor.

Or you can download the free Microsoft Visual Studio Express Edition (http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx).