Author Topic: Compile single files  (Read 4314 times)

Offline Ashu2912

  • Single posting newcomer
  • *
  • Posts: 2
Compile single files
« on: May 10, 2013, 05:27:04 am »
Hey guyz, Im new to using Code::Blocks and do simple programming in c++. I am facing a problem wherein i am unable to compile individual files in a project. I had to create a project in order to use the debugging feature, and read somewhere that i can only debug the files that belong to a project. Please help. thanks in advance!!! :)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compile single files
« Reply #1 on: May 10, 2013, 09:26:01 am »
Why don't you compile the whole project?
I doubt it is that slow.
(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 Ashu2912

  • Single posting newcomer
  • *
  • Posts: 2
Re: Compile single files
« Reply #2 on: May 11, 2013, 07:42:47 pm »
The thing is that my project contains files which need to be compiled separately, each has it's own main()!!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compile single files
« Reply #3 on: May 11, 2013, 07:52:01 pm »
Then why don't you make different projects or different targets.
You're abusing the project system with your setup.


p.s. another option is to disable the building/linking of the other files (right click on the file -> properties -> build)
(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!]