Compile a single file from project

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

Pavelmoje
Posts: 3
Joined: Fri Sep 07, 2018 6:44 am

Compile a single file from project

Postby Pavelmoje » Fri Sep 07, 2018 7:02 am

Hello all,
is it possible to compile a single file and not a complete project?
Is there any solution for this?

Mattias Norlander
Posts: 262
Joined: Fri Apr 29, 2016 10:01 am

Re: Compile a single file from project

Postby Mattias Norlander » Fri Sep 07, 2018 2:19 pm

Yes there is a setting called "build automatically" that we enable. When this setting is enabled the "build selected file" option is removed from the right-click context menu in the project explorer. Annoying...

If you want this feature you need to disable "build automatically" which is an option we have hidden. Unhide this settings by:
Window --> Perspectives --> Customize perspective --> menu visibility --> Project --> Build automatically <-- CHECK!. Click OK!
Now disable "build autoamtically":
Project --> Build automatically <-- UNCHECK!

Now right-click on any c-file and you have two options:
- Build selected files
- Clean selected files

Pavelmoje
Posts: 3
Joined: Fri Sep 07, 2018 6:44 am

Re: Compile a single file from project

Postby Pavelmoje » Sat Sep 08, 2018 5:15 am

Thank you Mattias. This is what i needed ;).

SantosM
Posts: 1
Joined: Fri Sep 28, 2018 9:06 am

Re: Compile a single file from project

Postby SantosM » Sat Oct 06, 2018 11:51 am

Hi Mattias, is there a reason why this feature is hidden? Does it mess with something else when you enable it?

Mattias Norlander
Posts: 262
Joined: Fri Apr 29, 2016 10:01 am

Re: Compile a single file from project

Postby Mattias Norlander » Mon Oct 08, 2018 9:13 am

OK - a small clarification. We have removed the "build automatically" entry in the "project" menu, this was done to clean up the stock Eclipse GUI which is difficult enough for new users. Maybe could be reconsidered today since Eclipse has won a lot of ground in the embedded space.
But the issue that having "Build automatically" enabled, hides the "build selected files" menu entry is not our idea. This is stock Eclipse/CDT behaviour.
I don't know the rationale behind this. Someone at Eclipse problably knows if you are interested in digging into it. :)


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 1 guest