09202024

Last update2016/05/28 14:38

5.project directoryの外にあるフォルダーをどのように組み込むことができますか?

5.project directoryの外にあるフォルダーをどのように組み込むことができますか?

By default, all subfolders in the project directory is considered to take part in the project, and no folders outside the project directory is considered to take part in the project.

To include a folder (containing many files) in the project, that is located outside the project directory, perform the following steps:

  1. Use the menu command "File, New, Other..." to open the "New" wizard.
  2. Expand the "General" node and double-click on "Folder".
  3. Click on the "Advanced >>" button that is displayed in the new dialog box.
  4. Select the checkbox "Link to folder in the file system" and browse to the folder external to the project directory.
  5. Finally click on the "Finish" button.

A symbol link to the external folder is now displayed in the Project Explorer view file tree.

If you want the new folder (or rather, the files inside the folder) to take part in building (compilation and linking), also perform the following steps:

  1. Right-click on the symbolic link that was created in the Project Explorer view file tree.
  2. In the context menu, select the menu command "Exclude from build..."
  3. Unselect the checkboxes in the dialog box, to make the files in the folder take part in the project build

4.project directoryの外にあるファイルをどのように組み込むことができますか?

4.project directoryの外にあるファイルをどのように組み込むことができますか?

By default, all files in the project directory is considered to take part in the project, and no files outside the project directory is considered to take part in the project.

To include a file in the project, that is located outside the project directory, perform the following steps:

  1. Use the menu command "File, New, Other..." to open the "New" wizard.
  2. Expand the "General" node and double-click on "File".
  3. Click on the "Advanced >>" button that is displayed in the new dialog box.
  4. Select the checkbox "Link to file in the file system" and browse to the file external to the project directory.
  5. Finally click on the "Finish" button.

A symbol link to the external file is now displayed in the Project Explorer view file tree.

If you want the new file to take part in building (compilation and linking), also perform the following steps:

  1. Right-click on the symbolic link that was created in the Project Explorer view file tree.
  2. In the context menu, select the menu command "Exclude from build..."
  3. Unselect the checkboxes in the dialog box, to make the file take part in the project build

3.どのようにproject & build settingsを設定できますか?

3.どのようにproject & build settingsを設定できますか?

Project & build settings can be accessed in two different ways:

  • Right-click on the project root node in the "Project Explorer" view file tree, and select "Properties" in the context menu.
  • Select the menu command "Project, Properties"

Using any of the above two methods, a "Project Properties" dialog box is opened. To the left is a tree with parameter categories, and to the right is a panel with detailed settings for the panel selected in the category tree to the left.

Additionally, global product settings can be made using the "Window, Preferences" menu command.

2.インデクサーからどのようにして古いディレクトリやシンボルを除けますか?

2.インデクサーからどのようにして古いディレクトリやシンボルを除けますか?

To clear the indexer include directories and symbols, do the following:

Right-click on your project in the Project Explorer and select Properties

Expand the C/C++ Build selection and click on Discovery Options

Set Discovery profiles scope to Per Language

Click the Clear button to the right and then press OK

Your project will now get updated include directories and symbols the next time you build your project.

1.ビルドの設定がどのようにC/C++ Editorで反映されますか?

1.ビルドの設定がどのようにC/C++ Editorで反映されますか?

A common question raised by TrueSTUDIO users concerns active build configuration and its reflection in the C/C++ editor. More explicitly this may concern symbols only valid for one of the different build configurations in a project. Let us take a look at a code example:

#ifdef RELEASE
  #include "release_cfg.h"
#elseif DEBUG
  #include "debug_cfg.h"
#endif

Lets say that RELEASE is the DEFAULT build configuration!

DEBUG is as symbol only valid when active build configuration is:  DEBUG

RELEASE is as symbol only valid when active build configuration is:  RELEASE

When switching build configuration from RELEASE (default) to DEBUG, the C/C++ Editor will still gray out '#include "debug_cfg.h"', 'while "#include release_cfg.h"' looks to be active. The build output itself will however reflect the active build configuration.

Users experienced with CDT in an Eclipse-based IDE most likely recognise this default behaviour, however it may seem a bit odd to new users. If user rather would like to have the C/C++ Editor reflecting the actual active build configuration, this can be set at project level in the project properties.

  1. Go to your project properties.
  2. Branch to: C/C++ General --> Indexer
  3. Check "Enable Project specific settings"
  4. Switch ro radio button "Use active build configuration"

C/C++ Editor Indexer settings

Your C/C++ Editor should now reflect the active build configuration, which may be more intuitive for some TrueSTUDIO users.