Page 1 of 1

c++ compiler

Posted: Tue Aug 21, 2007 11:34 am
by dspxguy
how would i know from unix command line which supported c++ compiler is being used with datastage.
thanks

Re: c++ compiler

Posted: Tue Aug 21, 2007 1:33 pm
by ds_is_fun
The UNIX command
which cc
Will tell you where c++ compiler is installed.
Sometime GNU c++ compilers could be installed. To check for that type-
which gcc

If no compilers are installed then you will see -
no cc found in <path>

Posted: Tue Aug 21, 2007 1:39 pm
by dspxguy
thanks for the post,
i found out where my compiler is located but....which gcc does not give me the desired output.
all it gives me is
which: 0652-141 There is no gcc in /usr/bin /etc /usr/sbin

Posted: Tue Aug 21, 2007 2:00 pm
by ray.wurlod
Then your PATH is not set up to find it. Use a find command.

Code: Select all

find / -name gcc -print 2>/dev/null

Posted: Tue Aug 21, 2007 2:10 pm
by ds_is_fun
When you find the path..I recommend you add the path to your profile.
Depending on your default shell add the path of the compiler to either of the login profiles below -

-rw-r--r-- 1 xthotaa etl 136 Aug 10 11:25 local.cshrc
-rw-r--r-- 1 xthotaa etl 157 Aug 2 08:29 local.login
-rw-r--r-- 1 xthotaa etl 174 Aug 2 08:29 local.profile

You can list them from your home path by the UNIX command
ls -l

Posted: Tue Aug 21, 2007 2:13 pm
by dspxguy
ray.wurlod wrote:Then your PATH is not set up to find it. Use a find command.

Code: Select all

find / -name gcc -print 2>/dev/null
...

Hi ray,
thnks for the post, i did try that but nothing happened, all i could see was the cursor blinking in the unix prompt , i also checked the output file and it was empty. :cry:

Posted: Tue Aug 21, 2007 2:21 pm
by ds_is_fun
Try this
find -name gcc -print 2>/<your home path>/2

Posted: Tue Aug 21, 2007 2:51 pm
by dspxguy
ds_is_fun wrote:Try this
find -name gcc -print 2>/<your home path>/2

Cannot write to a directory.
ksh: /home/gurty: 0403-005 Cannot create the specified file.

seems i dont have the priviliges

Posted: Tue Aug 21, 2007 2:53 pm
by ds_is_fun
Hey! you cannot write to a directory. You can only write to a file.
You missed the /2 at the end of your path.
find -name gcc -print 2>/<your home path>/2
Is that a Solaris machine you have there?

dspxguy wrote:
ds_is_fun wrote:Try this
find -name gcc -print 2>/<your home path>/2

Cannot write to a directory.
ksh: /home/gurty: 0403-005 Cannot create the specified file.

seems i dont have the priviliges

Posted: Tue Aug 21, 2007 3:08 pm
by dspxguy
ds_is_fun wrote:Hey! you cannot write to a directory. You can only write to a file.
You missed the /2 at the end of your path.
find -name gcc -print 2>/<your home path>/2
Is that a Solaris machine you have there?

dspxguy wrote:
ds_is_fun wrote:Try this
find -name gcc -print 2>/<your home path>/2

Cannot write to a directory.
ksh: /home/gurty: 0403-005 Cannot create the specified file.

seems i dont have the priviliges
i have aix unix 5.3
it worked.
but when i go and see in my home directory i see the file i created (2) and when i do a vi , i see this
Usage: find [-H | -L] Path-list [Expression-list]

Posted: Tue Aug 21, 2007 3:16 pm
by dspxguy
ok i found the command for finding out the compiler version

Code: Select all

lslpp -l | grep xlC

Thanks for your help guys

Re: c++ compiler

Posted: Tue Aug 21, 2007 8:59 pm
by Yuan_Edward
DataStage Environment Variable APT_COMPILER/APT_LINKER should give the answer.
dspxguy wrote:how would i know from unix command line which supported c++ compiler is being used with datastage.
thanks