Author Topic: code statistics plugin - project is empty!  (Read 6136 times)

Offline Story

  • Single posting newcomer
  • *
  • Posts: 9
code statistics plugin - project is empty!
« on: October 12, 2011, 02:48:56 am »
I have a project that was initially empty, but I added the PuTTy source to it using the recursive add option. I am trying to use the code statistics plugin, but no matter what I do, it just pops up a message saying the project is empty, even though it clearly isn't. I've tried saving the project, and restarting Code::Blocks, but it still won't work. What should I do?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: code statistics plugin - project is empty!
« Reply #1 on: October 12, 2011, 03:40:51 am »
If you try to build, does Code::Blocks succeed in compilation?

Offline Story

  • Single posting newcomer
  • *
  • Posts: 9
Re: code statistics plugin - project is empty!
« Reply #2 on: October 12, 2011, 03:50:31 am »
No (it complains about a missing header file)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: code statistics plugin - project is empty!
« Reply #3 on: October 12, 2011, 05:17:18 am »
I don't have such problem.
So would you show/share your project files then I can test for you.
Which version of CB did you use? I suggest you can try a latest nightly build version.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: code statistics plugin - project is empty!
« Reply #4 on: October 12, 2011, 09:56:03 am »
I have a project that was initially empty, but I added the PuTTy source to it using the recursive add option.
This won't work, as the sources also contain platform specific stuff, so you are mixing incompatible files and surely you won't find e.g. MacOS SDK files on a Windows platform. Instead, use the Dev++ project tat ships with the sources you can download (nor checkout!) and import this project. You'll need a few adjustments depending on your compiler (i.e. if its >4.6.x) and you are done.
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