User forums > General (but related to Code::Blocks)

New template compile and link files

(1/1)

electrolot:
How can I set in template file which file in project should be compiled and linked for selected build target. For example I create two new build targets and I want set which file belongs for first and second build target.
I know that I can use code:

--- Code: --- for (i = 0; i < project.GetFilesCount(); i++)
  {
  project.GetFile(i).compile = true;
  project.GetFile(i).link = true;
  }
--- End code ---

but this code select files only for first build target.

Navigation

[0] Message Index

Go to full version