jfz2004
asked on
Compiling a sample c file takes forever on unix
Hi,
I have a sample c file - test.c and I am compiling it on unix
and it is take forever and still working on it to just compile.
The command I typed in is:
% cc test.c
and the compiler I use is: /vol/opt/SUNWspro.new/bin/ cc
and the file is:
main()
{
float x, y, z, sum, avg;
printf("Please enter 3 numbers: ");
scanf("%f %f %f", &x, &y, &z);
sum = x + y + z;
avg = sum / 3.0;
printf("The average of the three numbers is: %f\n",avg);
}
Why isn't it just compile and give me a.out?
Thanks,
Also any good and free c compiler on Windows 2000/XP?
Jennifer
I have a sample c file - test.c and I am compiling it on unix
and it is take forever and still working on it to just compile.
The command I typed in is:
% cc test.c
and the compiler I use is: /vol/opt/SUNWspro.new/bin/
and the file is:
main()
{
float x, y, z, sum, avg;
printf("Please enter 3 numbers: ");
scanf("%f %f %f", &x, &y, &z);
sum = x + y + z;
avg = sum / 3.0;
printf("The average of the three numbers is: %f\n",avg);
}
Why isn't it just compile and give me a.out?
Thanks,
Also any good and free c compiler on Windows 2000/XP?
Jennifer
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I searched for gcc but it seems to be a unix compiler.
Although it has something called DJGPP, but the web links in
DJGPP all failed.
I may check for minGW.
After ping lserv2 I got :
no answer from lserv2
So I know what's wrong with it.
Thanks.
Jennifer
Although it has something called DJGPP, but the web links in
DJGPP all failed.
I may check for minGW.
After ping lserv2 I got :
no answer from lserv2
So I know what's wrong with it.
Thanks.
Jennifer
ASKER
License Error : Cannot connect to the license server (lserv2)..
for product(Sun WorkShop Compiler C).
(License server may not have been started)
Cannot connect to license server (-15,12:145) Connection timed out
cc: acomp failed for test.c