LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 12-09-2009, 03:11 AM   #1
swadesh213
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Red face Not able to compile cpp program on AIX


Hi All,
This is the 1st time I am posting a question, in the hope to get the answer.

I have tried a small and simple CPP program and it is not compliling.

$ cat istcppprogram.cpp
#include <iostream>
using namespace std;
int main()
{
cout << " This is the 1st CPP program" << "\n";
return 0;
}[/COLOR]$


While compiling in this way

$ gcc istcppprogram.cpp
It show me the below error

Could not load program /bin/ps:
Insufficient permission to create loader domain /usr/local/bin/gcc
System error: Permission denied
ld: 0711-317 ERROR: Undefined symbol: std::cout
ld: 0711-317 ERROR: Undefined symbol: .std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::Init[in-charge]()
ld: 0711-317 ERROR: Undefined symbol: .std::ios_base::Init::~Init [in-charge]()
ld: 0711-317 ERROR: Undefined symbol: __gxx_personality_v0
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status


I checked the env and there was no LD_LIBRARY_PATH
so I gave
export LD_LIBRARY_PATH=/usr/local/bin/gcc

Still it is not working.
Please give me some idea.
 
Old 12-09-2009, 12:43 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Do you have sufficient privileges to run the programs it mentions (ps, gcc)? It might be something to do with your user's group memberships. Perhaps you need to be added to an additional group to get permission to run things in certain folders?
Do regular users have execute permission on the gcc binary?

Also, for C++ you want g++, not gcc. gcc is the C compiler.
 
  


Reply



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
how to compile and run a db2 cobol program on AIX sekhar@gsr Linux - Newbie 1 03-05-2009 06:47 PM
can`t compile a cpp program on fedora7 live cd version modernsir Linux - Newbie 3 09-22-2007 02:04 AM
AIX System Call in Cpp varunharidas AIX 2 08-03-2006 07:42 AM
How to compile a C++ file (.cpp) with allegro? RHLinuxGUY Programming 5 11-29-2005 02:06 AM
compile programs in c and cpp Manjula.S Linux - Software 2 10-15-2003 01:06 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 09:40 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