Unix Technical Forum

How to locate/use a C++ compiler on this AIX machine?

This is a discussion on How to locate/use a C++ compiler on this AIX machine? within the AIX Operating System forums, part of the Unix Operating Systems category; --> I am really new at this, so any help would be great. I am working on an aix 5.2 ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 08:15 AM
robtims@gmail.com
 
Posts: n/a
Default How to locate/use a C++ compiler on this AIX machine?

I am really new at this, so any help would be great.

I am working on an aix 5.2 system and struggling to figure out if a C++
compiler (any kind) is available and how to invoke it. lslpp tends to
indicate that xlc is installed ok (see output below) and I also see xlc
related stuff under /usr/lpp. Does that mean xlc is installed ok and I
should be able to compile a C++ program. How do I invoke the compiler?
Tried xlc, xlC etc nothing works. Not even cc works on this machine. Is
it an issue with my enviornment? I tried make with a makefile that
references xlc, no luck, of course. How do I locate/use any C++
compiler on this machine?

TIA.


kt450:/usr/lpp>lslpp -h "*cpp*"
Fileset Level Action Status Date Time

----------------------------------------------------------------------------
Path: /usr/lib/objrepos
xlC.cpp
5.0.2.0 COMMIT COMPLETE 01/06/02
09:34:14

xlC.msg.en_US.cpp
5.0.2.0 COMMIT COMPLETE 01/06/02
09:39:01

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 08:15 AM
Patrick Begou
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

robtims@gmail.com a écrit :
> I am really new at this, so any help would be great.
>
> I am working on an aix 5.2 system and struggling to figure out if a C++
> compiler (any kind) is available and how to invoke it. lslpp tends to
> indicate that xlc is installed ok (see output below) and I also see xlc
> related stuff under /usr/lpp. Does that mean xlc is installed ok and I
> should be able to compile a C++ program. How do I invoke the compiler?
> Tried xlc, xlC etc nothing works. Not even cc works on this machine. Is
> it an issue with my enviornment? I tried make with a makefile that
> references xlc, no luck, of course. How do I locate/use any C++
> compiler on this machine?
>
> TIA.
>
>
> kt450:/usr/lpp>lslpp -h "*cpp*"
> Fileset Level Action Status Date Time
>
> ----------------------------------------------------------------------------
> Path: /usr/lib/objrepos
> xlC.cpp
> 5.0.2.0 COMMIT COMPLETE 01/06/02
> 09:34:14


This is C++ compiler.

>
> xlC.msg.en_US.cpp
> 5.0.2.0 COMMIT COMPLETE 01/06/02
> 09:39:01
>


My C++ compiler is located in the default:
begou@sge: whence xlC
/usr/vacpp/bin/xlC

Check you PATH variable. The name is xlC.

Patrick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 08:15 AM
Uli Link
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

Patrick Begou schrieb:

> robtims@gmail.com a écrit :
>
>> I am really new at this, so any help would be great.
>>
>> I am working on an aix 5.2 system and struggling to figure out if a C++
>> compiler (any kind) is available and how to invoke it. lslpp tends to
>> indicate that xlc is installed ok (see output below) and I also see xlc
>> related stuff under /usr/lpp. Does that mean xlc is installed ok and I
>> should be able to compile a C++ program. How do I invoke the compiler?
>> Tried xlc, xlC etc nothing works. Not even cc works on this machine. Is
>> it an issue with my enviornment? I tried make with a makefile that
>> references xlc, no luck, of course. How do I locate/use any C++
>> compiler on this machine?
>>
>> TIA.
>>
>>
>> kt450:/usr/lpp>lslpp -h "*cpp*"
>> Fileset Level Action Status Date Time
>>
>> ----------------------------------------------------------------------------
>>
>> Path: /usr/lib/objrepos
>> xlC.cpp
>> 5.0.2.0 COMMIT COMPLETE 01/06/02
>> 09:34:14

>
>
> This is C++ compiler.


Nope.
This is only the C/C++ preprocessor which is like ld bundled with the O/S.


>
>>
>> xlC.msg.en_US.cpp
>> 5.0.2.0 COMMIT COMPLETE 01/06/02
>> 09:39:01
>>


This is the NLS messages for the en_US locale for the preprocessor.

No C/C++ compiler installed via installp or rpm package.

--
Uli

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 08:15 AM
Clive George
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

<robtims@gmail.com> wrote in message
news:1124425671.145456.62560@g44g2000cwa.googlegro ups.com...

> I am working on an aix 5.2 system and struggling to figure out if a C++
> compiler (any kind) is available and how to invoke it. lslpp tends to
> indicate that xlc is installed ok (see output below) and I also see xlc
> related stuff under /usr/lpp. Does that mean xlc is installed ok and I
> should be able to compile a C++ program. How do I invoke the compiler?
> Tried xlc, xlC etc nothing works. Not even cc works on this machine. Is
> it an issue with my enviornment? I tried make with a makefile that
> references xlc, no luck, of course. How do I locate/use any C++
> compiler on this machine?


On our aix 5.2 boxes, I need to set the path to include /usr/vac/bin, then
cc works. But as noted that's a C compiler, not C++.

When I've looked at wanting to do C++, I think it's come down to two
choices: Pay money for CSet++ or install gcc. Since I wasn't doing big stuff
anyway, I just gave up.

Disclaimer : Any or all of the above could be nonsense.

cheers,
clive


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 08:15 AM
robtims@gmail.com
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

Thanks for all the replies. I have to agree with Uli that whatever I
see with label xlc on my machine seems to be freebies that came with
OS, not the xlc compiler. xlc is sold separately, isn't it? Makes it
more likely that I don't have xlc they wouldn't have paid for it. I
tried a find on the entire system looking for *vac*, nothing turned up,
so I guess that seals it.

AIX 5.2 doesn't include an ANSI C++ compiler? How about a plain C
compiler?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 08:15 AM
robtims@gmail.com
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

If I want to use a free compiler, is gcc a good one? And if I install
it on my machine, can I contain it within a folder, or does it spread
itself all over? I am experimenting and the sys admin will not like it
if gcc installs files all over the place.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 08:15 AM
Clive George
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

<robtims@gmail.com> wrote in message
news:1124458351.776934.115660@g43g2000cwa.googlegr oups.com...
> If I want to use a free compiler, is gcc a good one?


Seeing as how it's pretty much the standard compiler for an awful lot of
systems, I'd say yes :-)

cheers,
clive


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-05-2008, 08:15 AM
Uli Link
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

robtims@gmail.com schrieb:
> If I want to use a free compiler, is gcc a good one?


It's free and on many platforms GCC is an excellent compiler suite.
AIX is *not* one of the good platforms of GCC :-(

> And if I install
> it on my machine, can I contain it within a folder, or does it spread
> itself all over?


You can find packaged GCC binaries, so they can removed.
http://aixpdslib.seas.ucla.edu/
http://www.bullfreeware.com/
http://www-03.ibm.com/servers/aix/products/aixos/linux/


Else GCC usually installs only below one given directory.
Depending on which package you use, this dir may be shared with other
packages.

> I am experimenting and the sys admin will not like it
> if gcc installs files all over the place.


For some experiments GCC will be ok. As long as you don't use it for
performance evaluation of the pSeries platform. In the very most cases
IBM's VisualAge C++ or XL/C++ will produce much faster results.

--
Uli
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-05-2008, 08:15 AM
Laurenz Albe
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

robtims@gmail.com wrote:
> If I want to use a free compiler, is gcc a good one? And if I install
> it on my machine, can I contain it within a folder, or does it spread
> itself all over? I am experimenting and the sys admin will not like it
> if gcc installs files all over the place.


You can install it while not being root, this maybe requires some
tar-ed form (or you manually extract the package you get).

For most package formats you can also list the contents before installing
and make sure it doesn't write where you don't want it to.

BTW, what is a folder?

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-05-2008, 08:15 AM
Uli Link
 
Posts: n/a
Default Re: How to locate/use a C++ compiler on this AIX machine?

Laurenz Albe schrieb:

> BTW, what is a folder?

Something animated on a Windows Desktop?

--
Uli
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com