Author Topic: Why don't my programs compile and run in Ubuntu?  (Read 4481 times)

Offline JM1082

  • Single posting newcomer
  • *
  • Posts: 2
Why don't my programs compile and run in Ubuntu?
« on: May 25, 2011, 09:43:25 pm »
Hi all,

I'd love to be able to swap from Windows to Ubuntu completely but I can't get my Ubuntu Codeblocks to build & run my programs.

When I select build & run I get a window pop up saying "Permission denied" and "Nothing to be done" in the build log instead of my program output.

If anybody has a solution to this problem I'd be eternally grateful!

Please see the picture attached for an example of the problem.

[attachment deleted by admin]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Why don't my programs compile and run in Ubuntu?
« Reply #1 on: May 25, 2011, 10:15:33 pm »
1. at least you have to save the file with an appropriate file-ending (.c in your case), to make it compilable.
2. I suggest using a wizard created project to do the first steps ("File -> New -> Project -> Console application")
If you need to debug your program, you have to use projects anyway, because debugging standalone-files is not (yet ?) supported.

Offline JM1082

  • Single posting newcomer
  • *
  • Posts: 2
Re: Why don't my programs compile and run in Ubuntu?
« Reply #2 on: May 25, 2011, 11:49:47 pm »
Success! Thank you!
:^)

But how comes it works without a project in the Windows version?  Does it have something to do with the MingW compiler???

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Why don't my programs compile and run in Ubuntu?
« Reply #3 on: May 26, 2011, 12:12:05 am »
Success! Thank you!
:^)

But how comes it works without a project in the Windows version?  Does it have something to do with the MingW compiler???
You can compile and run a single file without a project in windows and linux, but you need a proper file-ending to make C::B know which compiler to invoke.
But debugging does not work without a project, neither on linux nor on windows !