terrible time using gcc


 
Thread Tools Search this Thread
Top Forums Programming terrible time using gcc
# 1  
Old 05-21-2002
Network terrible time using gcc

I'm trying the 'hello world' program. This is my code:

$ more helloworld.c
main()
{
printf("Hello world.\n");
}

$

This is the output I get when trying to compile using gcc:

$ gcc -v helloworld.c -o helloworld
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/cpp -lang-c -v -D__GNUC__=2
-D__GNUC_MINOR__=95 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun
__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asy
stem(svr4) -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) helloworld.c /var
/tmp/ccCl9oKd.i
GNU CPP version 2.95.2 19991024 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/../../../../sparc-sun-solari
s2.8/include
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/../../../../include/g++-3
End of omitted list.
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/cc1 /var/tmp/ccCl9oKd.i -qui
et -dumpbase helloworld.c -version -o /var/tmp/ccSEfwCk.s
GNU C version 2.95.2 19991024 (release) (sparc-sun-solaris2.8) compiled by GNU C
version 2.95.2 19991024 (release).
/usr/local/sparc-sun-solaris2.8/bin/as -V -Qy -s -o /var/tmp/ccODEV7t.o /var/tm
p/ccSEfwCk.s
GNU assembler version 2.11.2 (sparc-sun-solaris2.8) using BFD version 2.11.2
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/collect2 -V -Y P,/usr/ccs/li
b:/usr/lib -Qy -o helloworld /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/
crt1.o /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/crti.o values-Xa.o /us
r/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/crtbegin.o -L/usr/local/lib/gcc-
lib/sparc-sun-solaris2.8/2.95.2 -L/usr/local/sparc-sun-solaris2.8/lib -L/usr/ccs
/bin -L/usr/ccs/lib -L/usr/local/lib /var/tmp/ccODEV7t.o -lgcc -lc -lgcc /usr/lo
cal/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/crtend.o /usr/local/lib/gcc-lib/spar
c-sun-solaris2.8/2.95.2/crtn.o
/usr/local/sparc-sun-solaris2.8/bin/ld: cannot open values-Xa.o: No such file or
directory
GNU ld version 2.11.2 (with BFD 2.11.2)
Supported emulations:

elf32_sparc

elf64_sparc
collect2: ld returned 1 exit status

Any ideas?

Thanks in advance.
# 2  
Old 05-21-2002
#include<stdio.h>

int main()
{
printf("Hellow World!\n");
return 0;
}

Should be the answer, you script seems doesnt have any Header #include<stdio.h> and the return 0;

Try to $ gcc -o helloworld helloworld.c
# 3  
Old 05-22-2002
try cc and the file name

$cc filename
# 4  
Old 05-22-2002
or try

gcc -c filename.c -o filename.o
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

modifying date and time and time zone on solaris 5.10 with (redundant server) veritas

I have a cluster of two Solaris server (veritas cluster). one working and the other is standby I am going to change the date on them , and am looking for a secure solution as it is giving an important service. my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies

2. Shell Programming and Scripting

Having a terrible problem with quotes/single quotes!

Hello. I'm trying to write a bash script that uses GNU screen and have hit a brick wall that has cost me many hours... (I'm sure it has something to do with quoting/globbing, which is why I post it here) I can make a script that does the following just fine: test.sh: #!/bin/bash # make... (2 Replies)
Discussion started by: jondecker76
2 Replies

3. Solaris

Terrible SMB performance!?

Hi, I tried this question on OTN Discussion Forum, but it seems that forum doesn't have as much activity so I thought I'd try here. I have a big performance problem with Samba server on a fresh install of Solaris Express 11 svn_151a, and a freshly created ZFS pool. I'm getting about 3 to 10 MB/s... (2 Replies)
Discussion started by: doublemeat
2 Replies

4. UNIX for Dummies Questions & Answers

How to get a compiler gcc, cc, cl.exe...? (literally 1st time unix user)

Hi all, I've done hours of reading on google and can't find an answer... I'm trying to compile/install the Apache web server on a Unix vm. When i try ./compile (the file's been unzipped already), I get this error: $ ./configure checking for chosen layout... Apache checking for working mkdir... (8 Replies)
Discussion started by: eddlo
8 Replies

5. UNIX for Dummies Questions & Answers

nohup has a terrible bad performance compared with interactive command, why?

I have a strange situation. I'm running a shell script containing several data uploads (using Oracle sqlloader utility). This script is being run on a Red Hat server. I tried to run it in background: $ nohup upload.sh & This script uploads some thousands files. After several hours I... (0 Replies)
Discussion started by: viniciov
0 Replies

6. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

Hi guys, I know that this topic has been discuss numerous times, and I have search the net and this forum for it. However, non able to address the problem I faced so far. I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies

7. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

8. UNIX for Advanced & Expert Users

How To Provide Time Sync Using Nts-150 Time Server On Unix Network?

can anybody tel lme,how to instal NTS -150 on a unix network,it needs some patch to fetch time frm serve,,?? (2 Replies)
Discussion started by: pesty
2 Replies
Login or Register to Ask a Question