Author Topic: running multiples files in a project  (Read 5200 times)

Offline benkenobi01

  • Multiple posting newcomer
  • *
  • Posts: 64
running multiples files in a project
« 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 (?)
« Last Edit: January 23, 2010, 02:58:10 am by benkenobi01 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: running multiples files in a project
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline benkenobi01

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: running multiples files in a project
« Reply #2 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 )?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: running multiples files in a project
« Reply #3 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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline benkenobi01

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: running multiples files in a project
« Reply #4 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.
« Last Edit: January 25, 2010, 03:52:29 am by benkenobi01 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: running multiples files in a project
« Reply #5 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
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline benkenobi01

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: running multiples files in a project
« Reply #6 on: January 25, 2010, 04:11:35 pm »
thank you, i got it running. :D