X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=BAYES_40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <23166858.post@talk.nabble.com> Date: Tue, 21 Apr 2009 18:10:26 -0700 (PDT) From: bigsnail To: cygwin AT cygwin DOT com Subject: permission denied for g++ with shared library MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, I just installed the latest CYGWIN on my WinXP SP3 Professional. When I compile a hello.cpp like below using g++ -shared -o hello hello.cpp It successfully compiles but when I run ./hello, it complains: -bash: ./hello: Permission denied I've already run "chmod 777 /lib" and "chmod 777 /bin", and it doesn't help. Also added export LD_LIBRARY_PATH=/lib still doesn't work. If I compile by "g++ -o hello hello.cpp", it runs well. Could anybody give me some clue how to fix it? Thanks a lot. Henry hello.cpp: #include using namespace std; int main () { cout << "Hello World!\n"; return 0; } -- View this message in context: http://www.nabble.com/permission-denied-for-g%2B%2B-with-shared-library-tp23166858p23166858.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/