Code::Blocks Forums

User forums => Help => Topic started by: benkenobi01 on January 23, 2010, 02:56:20 am

Title: running multiples files in a project
Post by: benkenobi01 on January 23, 2010, 02:56:20 am
hello
i have a CBP  wich contains two c++ files , is it possible to run per file, to run one file at a time ?
regards.

edit: now that i have two files in the CBP i'm always asked to build the files and cant run them (?)
Title: Re: running multiples files in a project
Post by: MortenMacFly on January 23, 2010, 10:23:37 am
i have a CBP  wich contains two c++ files , is it possible to run per file, to run one file at a time ?
You cannot "run" C++ files...?! What exactly do you want to do? If you mean two have two applications in a project file than create yourself two targets and bind the file(s) to the targets accordingly. If you provide more insight / a sample projects (zipped!) I might better understand what you mean.
Title: Re: running multiples files in a project
Post by: benkenobi01 on January 24, 2010, 12:27:04 am
hello,
here is a screenshot so you can understand my question, so there are two .c files in my cbp (those two .c file have a main method) and i would like to know if it's possible to build/ run them independently (in other words to make a corresponding  .exe of each one )?
(http://img132.imageshack.us/img132/2063/sanstitre1kc.jpg)
Title: Re: running multiples files in a project
Post by: oBFusCATed on January 24, 2010, 01:06:29 am
... create yourself two targets and bind the file(s) to the targets accordingly....
This is you answer...
Title: Re: running multiples files in a project
Post by: benkenobi01 on January 25, 2010, 03:47:25 am
i have try to do this but still cant make it work, is there a tutorial or can you give me a more detailed explanation (i need something a bit more step by step), if it's not too much to ask for.
i got Debug and Release wich are the two default build targets, so do i need to create two new debug and release targets and bind my file to these two new targets ?
regards.
Title: Re: running multiples files in a project
Post by: MortenMacFly on January 25, 2010, 06:19:15 am
i got Debug and Release wich are the two default build targets, so do i need to create two new debug and release targets and bind my file to these two new targets ?
Please read this:
http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks
and this:
http://www.codeblocks.org/docs/main_codeblocks_en3.html#x3-60001.4
(see an overview here:)
http://www.codeblocks.org/docs/main_codeblocks_en.html
Title: Re: running multiples files in a project
Post by: benkenobi01 on January 25, 2010, 04:11:35 pm
thank you, i got it running. :D