Code::Blocks Forums

User forums => Help => Topic started by: aso4200 on September 25, 2021, 06:43:50 pm

Title: How to make a project build different files with shared common source cpp files
Post by: aso4200 on September 25, 2021, 06:43:50 pm
Hi

I wonder if, it is possible to make a project using shared source files, but ending up making different executetables, depending on different 'main' files in the project.
I know that I can enable or disable certain source files in options for compile and/or link.
But I miss a way to quickly shift between making these different executetables, eg setting up which files in use for making the right file.
Is there a way for solving this ?
Title: Re: How to make a project build different files with shared common source cpp files
Post by: Miguel Gimenez on September 25, 2021, 06:47:00 pm
Targets?
Title: Re: How to make a project build different files with shared common source cpp files
Post by: aso4200 on September 25, 2021, 07:07:17 pm
Not sure I know what you mean with targets, but running Codeblocks 20.03 on windows 64 bit, if thats what you mean.
Title: Re: How to make a project build different files with shared common source cpp files
Post by: Miguel Gimenez on September 25, 2021, 07:15:48 pm
Read the user manual (https://www.codeblocks.org/docs/manual_codeblocks_en.pdf), section 1.4: Create projects from build targets
Title: Re: How to make a project build different files with shared common source cpp files
Post by: aso4200 on September 25, 2021, 10:31:24 pm
Now I got it working.
Thanks for your help.