LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2006, 06:45 PM   #1
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Rep: Reputation: 30
help with installing gcc


to my knowledge, it is possible to have your system set up to accept the command "gcc program.cpp -o program.exe" and this command will compile c++ source.

this is all i want, and for god sakes i can't manage to accomplish it.

i installed (i think) gcc.. here's what i have lol.. (yes i'm total noob)

Code:
[root@localhost ~]# cd /
[root@localhost /]# cd /usr/src/redhat/SOURCES
[root@localhost SOURCES]# ls
gcc-4.0.2-20051126               gcc4-ppc32-hwint32.patch
gcc-4.0.2-20051126.tar.bz2       gcc4-ppc32-msecure-plt.patch
gcc4-gnuc-rh-release.patch       gcc4-ppc64-m32-m64-multilib-only.patch
gcc4-ia64-libunwind.patch        gcc4-stack-protector.patch
gcc4-ia64-stack-protector.patch  gcc4-weakref.patch
gcc4-ice-hack.patch              libgcc_post_upgrade.c
gcc4-java-nomulti.patch
[root@localhost SOURCES]# cd gcc-4.0.2-20051126
[root@localhost gcc-4.0.2-20051126]# ls
ABOUT-NLS           COPYING      libgfortran   maintainer-scripts
boehm-gc            COPYING.LIB  libiberty     Makefile.def
ChangeLog           depcomp      libjava       Makefile.in
ChangeLog.tree-ssa  fastjar      libmudflap    Makefile.tpl
compile             fixincludes  libobjc       missing
config              gcc          libstdc++-v3  mkdep
config.guess        include      libtool.m4    mkinstalldirs
config-ml.in        INSTALL      ltcf-c.sh     move-if-change
config.rpath        install-sh   ltcf-cxx.sh   README
config.sub          intl         ltcf-gcj.sh   README.SCO
configure           libada       ltconfig      symlink-tree
configure.in        libcpp       ltmain.sh     ylwrap
contrib             libffi       MAINTAINERS   zlib
[root@localhost gcc-4.0.2-20051126]# man gcc
No manual entry for gcc
[root@localhost gcc-4.0.2-20051126]# whereis gcc
gcc: /usr/libexec/gcc
[root@localhost gcc-4.0.2-20051126]# cd /
[root@localhost /]# cd /usr/libexec/gcc
[root@localhost gcc]# ls
i386-redhat-linux
[root@localhost gcc]# ls -a
.  ..  i386-redhat-linux
[root@localhost gcc]# cd i386-redhat-linux
[root@localhost i386-redhat-linux]# ls
4.0.2
[root@localhost i386-redhat-linux]# cd4.0.2
bash: cd4.0.2: command not found
[root@localhost i386-redhat-linux]# cd 4.0.2
[root@localhost 4.0.2]# ls
cc1
[root@localhost 4.0.2]# ls -a
.  ..  cc1
[root@localhost 4.0.2]# cc2
bash: cc2: command not found
[root@localhost 4.0.2]# ./cc1
lol... what is going on right now?
 
Old 01-04-2006, 07:54 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381

Rep: Reputation: 47
you are trying to compile a windows exe on ur linux box?
 
Old 01-04-2006, 08:18 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
It looks like you installed a source RPM for gcc, which is why you see things in /usr/src. You need a binary RPM to install, since you need gcc to compile gcc (chicken and egg). You should be able to find one on your install media.
 
Old 01-04-2006, 11:39 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
what you are seeing are some of gcc's freinds and family
compile something using the -v switch and you see it all
as example i type
gcc -v -o dsp_info dsp_info.c
first thing it does is this
/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/cc1 -quiet -v dsp_info.c -quiet -dumpbase dsp_info.c -mtune=pentiumpro -auxbase dsp_info -version -o /tmp/cc4pXJBa.s

compilers are complicaed things
i think cc1 might be whats called a stub program ?
it's doing some of the work of converting the code into whats understood by the assembler or something
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing GCC Quiber Linux - Distributions 3 01-17-2005 03:29 AM
Installing GCC holyfeces Linux - Newbie 5 01-10-2005 02:35 PM
Installing gcc beep Linux - Software 1 06-12-2004 04:13 PM
installing gcc 2.95.3 flikmy Linux - Software 1 01-10-2004 04:13 PM
Installing GCC 3.1 over GCC 2.96...? aaronluke Linux - General 3 09-27-2002 05:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration