Author Topic: Just some observations  (Read 7384 times)

Offline 357mag

  • Multiple posting newcomer
  • *
  • Posts: 12
Just some observations
« on: May 03, 2010, 07:01:03 am »
I've been experimenting with CodeBlocks and discovered a few things. If you go into File - New Project -Empty Project - then give your project a title and all that then click Next and then the next screen where it talks about compiler configurations(I left all that default) then click Finish. Then after that go into New - File - CPP Source - and then give it a file name. Soon you will see a check box next to "add file to active project and build target." It seems this has to be checked. I don't know if you got to check both debug and release but I checked both of them and then clicked Finish. Then if you go ahead and write in your source code and run it everythings fine.

But if you follow these steps again but this time you do not check the box next to "add file to active project and build target" when you go to compile your code you will get an error "linking stage skipped. Build target has no object files to link. Nothing to be done."

So I guess that you must put a check mark in that "add file to active project" box but I'm not sure about whether or not you have to check the debug and release options.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Just some observations
« Reply #1 on: May 03, 2010, 07:24:09 am »
I never thought that anybody can have aroblem here.
It's all pretty much self-explaining in my opinion.

Please read the C::B manual to understand how C::B works: http://www.codeblocks.org/user-manual .

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Just some observations
« Reply #2 on: May 03, 2010, 08:39:43 am »
I had the same "problem" the very first time I tried C::B, but after having done some tests to understand how it works, I understood the C::B behaviour quickly. :D

Nevertheless, when I create a C/C++ file, the default is that Release/Debug checkbox are unchecked, and I should prefer them to be checked. But it's just my preference, not a real problem.
Kernel Extremist - PedroM power ©

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Just some observations
« Reply #3 on: May 03, 2010, 10:12:42 am »
... the default is that Release/Debug checkbox are unchecked, and I should prefer them to be checked. But it's just my preference, not a real problem.
You're using an old version, for me all targets are checked.
(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 Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Just some observations
« Reply #4 on: May 03, 2010, 02:23:57 pm »
svn 6206, provided by jens for Debian Lenny. But it doesn't matter at all for me. ;)
Kernel Extremist - PedroM power ©

Offline 357mag

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Just some observations
« Reply #5 on: May 03, 2010, 04:53:52 pm »
I never thought that anybody can have aroblem here.
It's all pretty much self-explaining in my opinion.

Please read the C::B manual to understand how C::B works: http://www.codeblocks.org/user-manual .

Actually the manual does not tell you to check that box at all. It discusses very little about it. And I have never used this IDE before so you assume too much.

Offline 357mag

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Just some observations
« Reply #6 on: May 03, 2010, 05:00:34 pm »
If a guy did forget to check that box and he forgot to check the debug and release boxes, is there a way for him to fix it after the fact? Can he go backward somehow and check those boxes?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Just some observations
« Reply #7 on: May 03, 2010, 05:07:38 pm »
If a guy did forget to check that box and he forgot to check the debug and release boxes, is there a way for him to fix it after the fact? Can he go backward somehow and check those boxes?

Either open the files properties via context-menu (right-click the file in the project-manager or if it's open right-click into the editor or the according tab) and go to the "Build"-tab and add it to the targets you want, or open the projects-properties (right-click the project in the project-manager or use the menu),  click the "Build targets"-tab and make sure the checkboxes for all "Build target files" that should belong to the target are checked.

Offline 357mag

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Just some observations
« Reply #8 on: May 03, 2010, 05:17:07 pm »
Thank You! Good to have a backup plan.