Author Topic: Possible to save a set of Build Options to be easily applied to new projects?  (Read 7621 times)

Offline holland11

  • Single posting newcomer
  • *
  • Posts: 2
I'm currently learning the SFML library and find it annoying to have to set my build options again every time that I start a new project. As a programmer, I am always looking for an easier way to do something and it seems like it wouldn't be that difficult to be able to save build options to be used as presets. Or even to become the new default build options.

Is this a thing?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
There are several solutions:
1, Wizard scripts - CodeBlocks, there are already many wizards or templates, and you can create new one or modify the existing ones

2, the project file ".cbp" file contains all the settings(such as build options), so when you want to create a new project, just copy the ".cbp" file, and change the source files.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline holland11

  • Single posting newcomer
  • *
  • Posts: 2
Makes sense. Thanks. Also tried File > Save Project As Template, then File > New > From Template. This seems to have done a simple copy of the .cbp and all source files into another directory of my choosing. Exactly what I was looking for.