Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
Can I replace Hello world boilerplate code with my own boilerplate?
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Can I replace Hello world boilerplate code with my own boilerplate? (Read 3958 times)
Steven Friedrich
Single posting newcomer
Posts: 7
Can I replace Hello world boilerplate code with my own boilerplate?
«
on:
March 04, 2022, 01:46:59 am »
When I create a new project, CB automagicallly includes a main.c with Hello world.
Is this specified in Settings somewhere? I can't find it. I would like to configure CB to use my own template.c, template.h, or template++.cpp, template++.h.
Logged
Pecan
Plugin developer
Lives here!
Posts: 2808
Re: Can I replace Hello world boilerplate code with my own boilerplate?
«
Reply #1 on:
March 04, 2022, 01:56:09 am »
You can right-click on any file in the project tree and chose "Remove file from project".
Then you can right-click on the project and choose "Add files" to add what files you like to the project.
Logged
Steven Friedrich
Single posting newcomer
Posts: 7
Re: Can I replace Hello world boilerplate code with my own boilerplate?
«
Reply #2 on:
March 04, 2022, 02:17:48 am »
Thanks for your reply. I have done that, but I would really like to make it automagic.
Logged
Pecan
Plugin developer
Lives here!
Posts: 2808
Re: Can I replace Hello world boilerplate code with my own boilerplate?
«
Reply #3 on:
March 04, 2022, 06:44:29 am »
Once you have added the files you like, you can save the project as a template. Menu->File->Save project as template.
Then when you want to create your new project, choose your template instead of one of the CB basic projects from the Menu->File->New->From template.
«
Last Edit: March 04, 2022, 06:48:08 am by Pecan
»
Logged
Steven Friedrich
Single posting newcomer
Posts: 7
SOLVED Re: Can I replace Hello world boilerplate code with my own boilerplate?
«
Reply #4 on:
March 04, 2022, 02:38:26 pm »
Thanks. That works exactly as I hoped.
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
Can I replace Hello world boilerplate code with my own boilerplate?