Author Topic: Unable to preform loops on Mac  (Read 3197 times)

ChrisDB

  • Guest
Unable to preform loops on Mac
« on: September 11, 2016, 06:20:42 am »
I'm taking an intro to c class (first programming class I've taken) and I'm working on a project that requires me to preform a loop. I tested one of my programs that used the while statement on the school pc and it worked fine. I started working on my second program that also used a while loop on my Mac and I get the error Process returned -1 (0xFFFFFFFF)   execution time : 3.024 s
Press ENTER to continue.

I practically spent all day trying to figure out what I was doing wrong so I brought up the program that I tested on the school pc. I get the same error when I try to execute the loop. This makes me wonder if Code::Blocks is bugged for Mac or I'm just super bad at programming. I can show you the code if that helps.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Unable to preform loops on Mac
« Reply #2 on: September 11, 2016, 08:23:53 am »
List of newbie things that might be wrong.

1. You do NOT have a compiler installed
2. Code::Blocks is NOT configured right to use the compiler.
3. Code::Blocks is NOT configured right to use the terminal when running program.
4. The Code::Blocks project is NOT configured right.
5. Your code has a bug in it. (Not a valid topic for this site) per rules http://forums.codeblocks.org/index.php/topic,9996.0.html
6. Under the Windows OS, it is common for the Anti-Virus software to stop the program from running.

Items 1 and 2 should be able to be ruled in or out by seeing the build log.

Item 3; you need to check what terminal options Code::Blocks is set to use.
Menu Option: "Settings" -> "Enviroment..."
Section: "General Settings"
Report the value in box "Terminal to launch console programs".
NOTE: I have no idea of the correct value; but, sometimes it needs changed or the terminal program needs installed.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Krice

  • Almost regular
  • **
  • Posts: 150
Re: Unable to preform loops on Mac
« Reply #3 on: September 11, 2016, 12:13:48 pm »
if Code::Blocks is bugged for Mac

It is. Some while ago I tried to compile one of my projects on Mac, but C::B crashed immediately when trying it. When that happens I usually just give up. Also, programming on Mac seems to be difficult, because it has that unix feel in it, all that command line crap just to get something installed if it's not XCode. I tried XCode, but you have to enter so much information about yourself when starting a project that I just laughed and said no.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Unable to preform loops on Mac
« Reply #4 on: September 11, 2016, 04:50:34 pm »
If Code::Blocks crashes the first thing to try is to disable all CB Plugins except for the Compiler plugin.

Method 1: Is start CB Normally and without opening a project or workspace disable the CB Plugins using the CB GUI.
Edit: You then need to exit out of Code::Blocks to get the change in settings saved before and crash happens.
You then start enabling one plugin at a time that you use to see which one crashes. Likely code completion or symtab will be the cause.

Edit2: Posting a crash log for Windows and Linux users help find the cause; no idea if this works under OSX.

The other methods are harder; and, I am NOT sure how to do on Mac OSX.

Tim S.

if Code::Blocks is bugged for Mac

It is. Some while ago I tried to compile one of my projects on Mac, but C::B crashed immediately when trying it. When that happens I usually just give up. Also, programming on Mac seems to be difficult, because it has that unix feel in it, all that command line crap just to get something installed if it's not XCode. I tried XCode, but you have to enter so much information about yourself when starting a project that I just laughed and said no.
« Last Edit: September 11, 2016, 05:23:16 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org