C++ Compilation problem on Linux

11 views
Skip to first unread message

sunny...@gmail.com

unread,
Jan 14, 2009, 2:28:31 AM1/14/09
to C/C++ Users' Group
Hi,

I need a help regarding comiplation of a cprogramme on linux machine.

When I log on linux machine with my userID and then switch to
superuser with " su" commands , it compiles perfectly. But when I
switch to superuser with "su -" command, It gives hell lot of errors.
It starts somthing like

"<command line>:1:1: macro names must be identifiers " .

I verified all include path and other enviornment variables , all the
exactly same.

Could anyone plz suggest what might be the cause of the problem ?

Thanks in advance.

Sunny,


Abhishek

unread,
Feb 12, 2009, 11:13:31 PM2/12/09
to C/C++ Users' Group
Is the LD_LIBRARY_PATH same when you do su and su - ??

On 14 Jan, 12:28, "sunny4fr...@gmail.com" <sunny4fr...@gmail.com>
wrote:

Sunny Gupta

unread,
Feb 13, 2009, 8:01:24 AM2/13/09
to c-cp...@googlegroups.com
LD_LIBRARY_PATH comes into pictuer while executing that binary not at the compile time . isn't it ?

Abhishek

unread,
Feb 17, 2009, 10:36:29 PM2/17/09
to C/C++ Users' Group
Its not necessary. You may also need this while compiling, in case you
are using any methods etc from other libraries. So you may need to
give the LD_LIBRARY_PATH to get reference to those libraries.
> > > Sunny,- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages