View Full Version : Xcode program won't run on any other mac besides mine

Mar 23, 2007, 07:51 AM
Hi everyone

I wrote a C++ program and compiled it in xcode. It runs, but only on my Mac. I think this might be because i have the xcode tools installed but my other Mac doesnt (They are both Intel macs).

Does anyone know how i can get my C++ program to work on another Mac without the dev tools? You can do this with Visual basic on Windows, so why not on a Mac?

Jenny xx

P.S. If this makes any difference, here is my code:
#include <stdio.h>

int main()
int num1, num2, num3;
int sum;

printf("Please enter the first number: ");
scanf("%d%*c", &num1);

printf("Please enter the second number: ");
scanf("%d%*c", &num2);

printf("Please enter the third number: ");
scanf("%d%*c", &num3);

sum = num1 + num2 + num3;

printf("The sum of the three numbers is: %d\n", sum);


Mar 23, 2007, 06:06 PM
You need to change the build configuration. Choose Project > Set Active Build Configuration > Release then rebuild and it should work. The Debug configuration allows you to debug but will only work on the computer it's built on.

Mar 23, 2007, 07:06 PM
This really needs to be a sticky, it comes up so frequently.