C compiler

I have just installed C compiler, the installation
was successful but when I try to excute a gcc file I received the error message

"types.c: In function `main':
> types.c:4: warning: return type of `main' is not `int'
> ld: fatal: file values-Xa.o: open failed: No such file or directory
> ld: fatal: File processing errors. No output written to a.out
> collect2: ld returned 1 exit status"

what does this means? How can I solve the problem?

Thanks in Advance

Post your code...

u may have given void main() and tried to return a value.. and thats why is the warning i think...

If you are trying to open a file from types.c file, then check for the access permissions.. may be thats why u r unable to open it.. or it may not be in the proper path...

Hope it helps...

-Nisha

I have checked my path and permissions all seems
fine. I could execute the script perfectly on another server but not on my newly installed
c compiler.

Any more suggestions? please

Thanks in Advance

I thought that Nisha's suggestion that you post your code was a good one. Without a lot more information, it will be hard to give you a useful response.

Returning an int in a main() typed as void isn't really a big deal in itself. And you only got an warning on that. But I would take it as a sign that you are attempting to compile a c program that was written by a careless programmer. Different compilers will yield different results when asked to compile non-standard c code. That raises the question: how identical are the servers and the compilers?

This would seem to be the crux of your current problem. values-Xa.o is the name of a file. The ld process can't find it. I would presume that somewhere there is a values-Xa.c which was compiled to generate this.

But somehow one server can find values-Xa.o and the other server can't.

send us the script!!!!

i'll try and compile it in gcc and see what happens

:slight_smile: How is the status? Previously, I wrote some programs using C languge in HP UNIX, I found that it is very sensitive to spacebar even in declaration part # include <stdio.h>