468,737 Members | 2,606 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,737 developers. It's quick & easy.

How to install and call the sun compiler instead of GCC?

In all my previous C++ projects I used the gcc as compiler.

For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?

Is the Sun C++ compiler pre-installed on Linux resp. Solaris?

How can I call him?

Pablo

Jun 27 '08 #1
11 3647
On May 17, 10:13 am, pcs...@yahoo.com (Pablo Suarez) wrote:
In all my previous C++ projects I used the gcc as compiler.

For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?

Is the Sun C++ compiler pre-installed on Linux resp. Solaris?

How can I call him?

Pablo
I highly doubt that - sun compiler on a linux box. But the reverse is
possible - having both sun c++ and g++ compiler on the same sun box.
You may refer the compilers using the absolute path. For example, your
sun compiler could be at /usr/SUNWSpro/bin/CC and your g++ could be
at /usr/local/bin/g++. You may ask your admin to install g++ for you
in the sun box. In all the cases(atleast what i have seen), g++ could
be on any box(sun,aix..) but the reverse isn't possible.

Thanks,
Balaji.
Jun 27 '08 #2
What I want know is why do you like to try sun conpiler on a linux
system?
On May 17, 11:13*pm, pcs...@yahoo.com (Pablo Suarez) wrote:
In all my previous C++ projects I used the gcc as compiler.

For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?

Is the Sun C++ compiler pre-installed on Linux resp. Solaris?

How can I call him?

Pablo
sun
Jun 27 '08 #3
HelloLinux wrote:
What I want know is why do you like to try sun conpiler on a linux
system?
Because it works? Some of us prefer the same tools on more than one
platform.

--
Ian Collins.
Jun 27 '08 #4
Pablo Suarez wrote:
In all my previous C++ projects I used the gcc as compiler.

For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?
Try comp.unix.solaris.

Hint - run the installer.

--
Ian Collins.
Jun 27 '08 #5
On 17 mai, 17:13, pcs...@yahoo.com (Pablo Suarez) wrote:
In all my previous C++ projects I used the gcc as compiler.
For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?
Is the Sun C++ compiler pre-installed on Linux resp. Solaris?
No C++ compilers are "pre-installed" under Solaris. As far as I
know, most Linux distributions do include a version of g++, but
none (again as far as I know) include Sun CC. For corporate
use, I'd contact Sun for the C++ compiler for both platforms.
(The product name is actually Sun Studio 12, and it includes C,
C++ and Fortran.) I think a free version is also available, but
I've not experimented with it. For g++ for Solaris, I find it
easy enough to build myself from the downloaded sources, but Sun
used to make precompiled versions available as well. (Sun also
has a version of gcc 4.2.0 available which will use the Sun
optimizer.)
How can I call him?
Under Solaris, you invoke g++ with the command "g++", and Sun
C++ with the command "CC". Provided your $PATH is set
correctly, of course. But you'll still need to look at the
docs; neither compiler is really usable with just the default
options, and you'll need to work out which options are best for
your situation.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #6
On 17 mai, 22:39, Ian Collins <ian-n...@hotmail.comwrote:
HelloLinux wrote:
What I want know is why do you like to try sun conpiler on a
linux system?
Because it works? Some of us prefer the same tools on more
than one platform.
Or multiple tools on each box. It's always useful to compile
your code with several different compilers, and test it in
several different environments.

At least on a Sparc, Sun optimizes better than gcc; it's quite
possible that this is true as well for a PC.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #7
James Kanze wrote:
On 17 mai, 17:13, pcs...@yahoo.com (Pablo Suarez) wrote:
>In all my previous C++ projects I used the gcc as compiler.
>For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?
>Is the Sun C++ compiler pre-installed on Linux resp. Solaris?

No C++ compilers are "pre-installed" under Solaris.
gcc is.
For corporate
use, I'd contact Sun for the C++ compiler for both platforms.
(The product name is actually Sun Studio 12, and it includes C,
C++ and Fortran.) I think a free version is also available, but
I've not experimented with it.
There is only one version, the free one.

--
Ian Collins.
Jun 27 '08 #8
On May 18, 9:54 pm, Ian Collins <ian-n...@hotmail.comwrote:
James Kanze wrote:
On 17 mai, 17:13, pcs...@yahoo.com (Pablo Suarez) wrote:
In all my previous C++ projects I used the gcc as compiler.
For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?
Is the Sun C++ compiler pre-installed on Linux resp. Solaris?
No C++ compilers are "pre-installed" under Solaris.
gcc is.
It didn't use to be:-).
For corporate
use, I'd contact Sun for the C++ compiler for both platforms.
(The product name is actually Sun Studio 12, and it includes C,
C++ and Fortran.) I think a free version is also available, but
I've not experimented with it.
There is only one version, the free one.
I'm sure you can pay for it as well. (I don't handle that end
of things here, so I don't know all the details. I do know that
there is a free version for Linux, but it doesn't work with
Linux 2.6, only Linux 2.4. Which doesn't say much for Linux'
maturity.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #9
James Kanze wrote:
On May 18, 9:54 pm, Ian Collins <ian-n...@hotmail.comwrote:
>There is only one version, the free one.

I'm sure you can pay for it as well. (I don't handle that end
of things here, so I don't know all the details. I do know that
there is a free version for Linux, but it doesn't work with
Linux 2.6, only Linux 2.4. Which doesn't say much for Linux'
maturity.)
You can opt to pay for support, the product is free. I'm not aware of
any restriction to Linux 2.4.

--
Ian Collins.
Jun 27 '08 #10
"Pablo Suarez" <pc****@yahoo.comwrote in message
In all my previous C++ projects I used the gcc as compiler.

For some reasons I want to try out the Sun compiler instead.
How can I install and use this compiler instead?

Is the Sun C++ compiler pre-installed on Linux resp. Solaris?
Your question is off-topic on this newsgroup. You should try some platform
dedicated to your platform to ask the question.
How can I call him?
How do you call "him" :-)? Through a Makefile probably? If yes, then you
know where to put the change.

--
http://techytalk.googlepages.com
Jun 27 '08 #11
On May 19, 11:56 am, Ian Collins <ian-n...@hotmail.comwrote:
James Kanze wrote:
On May 18, 9:54 pm, Ian Collins <ian-n...@hotmail.comwrote:
There is only one version, the free one.
I'm sure you can pay for it as well. (I don't handle that end
of things here, so I don't know all the details. I do know that
there is a free version for Linux, but it doesn't work with
Linux 2.6, only Linux 2.4. Which doesn't say much for Linux'
maturity.)
You can opt to pay for support, the product is free. I'm not
aware of any restriction to Linux 2.4.
The compiler works fine under later versions. The 64 bit linker
won't load its dynamic libraries correctly, however, which means
that it won't run. And of course, there's not much point in
compiling code if you cannot link it. (The problem may be
limited to the 64 bit version, but I don't have any 32 bit
system around to test it on.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by jtan325 | last post: by
23 posts views Thread by Fabian Müller | last post: by
8 posts views Thread by trying_to_learn | last post: by
1 post views Thread by Peter Hartmann | last post: by
8 posts views Thread by ThomasR | last post: by
3 posts views Thread by Jeremy S. | last post: by
2 posts views Thread by jai hanuman | last post: by
reply views Thread by =?utf-8?Q?Poor=20Yorick?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.