Author Topic: Error Profiling Code  (Read 6297 times)

Offline MikeTacular

  • Single posting newcomer
  • *
  • Posts: 7
Error Profiling Code
« on: June 19, 2008, 08:10:47 pm »
I'm using the GNU GCC Compiler, and I'm trying to profile my project.  I build it with -g and -pg.  After running the program, I use the Code Profiler plugin.  After selecting the build with the profile info, I get an error from the Code Profiler.  It says:

Unable to execute Gprof
Be sure it is in the OS global path
C::B Profiler could not complete the operation

I've tried googling this error message but I get absolutely no results.  It's weird because I've profiled things in the past and it's worked just fine.  I don't know why it's not working anymore.  I'm using Windows Vista, and I tried running Code::Blocks as an administrator but it didn't fix anything.  I don't know what I need to do.  Should I reinstall MinGW?  Oh, and I've installed MinGW in C:\MinGW directory.  Any ideas?

Offline zak

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Error Profiling Code
« Reply #1 on: June 20, 2008, 11:44:35 am »
Quote
It's weird because I've profiled things in the past and it's worked just fine.

Look at this:
http://forums.codeblocks.org/index.php/topic,8573.0.html

maybe it can help you.

Best Regards

Offline MikeTacular

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error Profiling Code
« Reply #2 on: June 20, 2008, 05:00:52 pm »
Yeah, I saw that page when I was searching for a solution.  I've already downloaded bintools 2.17.50, but now I'm not entirely sure what to do with them.  Should I replace the already installed MinGW files with them by just copy and pasting?

Offline zak

  • Multiple posting newcomer
  • *
  • Posts: 26
Re: Error Profiling Code
« Reply #3 on: June 20, 2008, 05:49:11 pm »
yes, I done that and it works.

just rename directory Mingw32

Best regards
« Last Edit: June 20, 2008, 05:52:37 pm by zak »

Offline MikeTacular

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error Profiling Code
« Reply #4 on: June 20, 2008, 10:09:25 pm »
I replaced all my MinGW files and it didn't fix it.  It's not quite the same problem as you had.  My problem isn't that it won't profile things correctly.  It's that when I try to run the Code Profiler plugin, it can't execute gprof.  I'm going to unistall Code::Blocks and MinGW and then reinstall.  I'll let you know if that helps at all.

Offline MikeTacular

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error Profiling Code
« Reply #5 on: June 20, 2008, 10:27:53 pm »
Uninstalling and reinstalling both MinGW and Code::Blocks didn't work.  The plugin still can't find gprof.

Offline MikeTacular

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error Profiling Code
« Reply #6 on: June 20, 2008, 10:35:38 pm »
I got it to work!!!!  So I read the error message carefully and thought that maybe when MinGW installed (or Code::Blocks isntalled, whichever one is supposed to do this) didn't add the correct directory to the Path environment variable (it infact didn't add any directory).  So I went in and added C:\MinGW\bin to the Path system variable and restarted Code::Blocks and it worked!