The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
C Compiler Roam SUN Solaris 25 05-15-2009 11:03 AM
xl C/C++ compiler to GCC compiler pbattu1 UNIX for Dummies Questions & Answers 0 02-27-2007 08:59 AM
CC compiler vtran4270 UNIX for Advanced & Expert Users 3 08-21-2002 12:58 PM
Pro*C Compiler HELP!!!!! pegasus High Level Programming 3 08-20-2002 10:44 AM
cc compiler / gcc florian.turck UNIX for Dummies Questions & Answers 2 05-21-2002 03:53 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-23-2002
hassan2 hassan2 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2002
Location: London, England
Posts: 262
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
  #2 (permalink)  
Old 09-23-2002
Nisha Nisha is offline
Registered User
  
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
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
  #3 (permalink)  
Old 09-23-2002
hassan2 hassan2 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2002
Location: London, England
Posts: 262
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
  #4 (permalink)  
Old 09-23-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Re: C compiler

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?

Quote:
Originally posted by hassan2

> ld: fatal: file values-Xa.o: open failed: No such file or directory
what does this means? How can I solve the problem?
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.
  #5 (permalink)  
Old 09-25-2002
perleo perleo is offline
Registered User
  
 

Join Date: Aug 2002
Location: Ireland
Posts: 139
send us the script!!!!

i'll try and compile it in gcc and see what happens
  #6 (permalink)  
Old 10-11-2002
lcfoo lcfoo is offline
Registered User
  
 

Join Date: Oct 2002
Location: Malaysia
Posts: 14
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>
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0