Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can i set the xcode 5 so that i can run c project like in the terminal

when i run a c project in the terminal like this :

#include <stdio.h>

int usr1 = 0, usr2 = 0;

void func(int);

void main1(int argc, const char * argv[])

{

signal(SIGUSR1, func);

signal(SIGUSR2, func);

for (; ; ) {

sleep(1);

}

}


void func(int sig)

{

if (sig == SIGUSR1) {

usr1++;

}

if (sig == SIGUSR2) {

usr2++;

}

fprintf(stderr, "SIGUSR1[%d]; SIGUSR2[%d]\n", usr1, usr2 );

signal(SIGUSR1, func);

signal(SIGUSR2, func);

}

int main(int argc, char * argv[])

{

main1(argc, argv[]);

return 0;

}




in the terminal i can compile like this : gcc -o test main.c

then i can run it in background like : ./test &



my question is :how can i set the xcode so that i can run this c project in background like the in the terminal?

OS X Mavericks (10.9.2)

Posted on Apr 17, 2014 2:32 AM

Reply

There are no replies.

How can i set the xcode 5 so that i can run c project like in the terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.