473,382 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Running C++ file

ilikesuresh
Hi,
I wrote the following c++ program in solaris.
For compilation i use,
g++ dup.cpp
command.But while executing like ./dup or dup ,the error i am getting is
ld.so.1: dup: fatal: libstdc++.so.5: open failed: No such file or directory
Killed

Tell me the reason for this and Is there any other way to execute the cpp program?
clarify me
Jan 21 '08 #1
3 2181
Laharl
849 Expert 512MB
The syntax for compilation into an executable is:

Expand|Select|Wrap|Line Numbers
  1. g++ *file*.cpp -o *executable name*
  2.  
The -o flag tells the compiler to make an executable of name following the -o, which can be run with ./ as normal. Compiling without it just checks for syntactical errors without running the linker, as if you had used the -c flag.

There are a number of other flags, some of which are very handy. Use man g++ for more information, or consult Google.
Jan 21 '08 #2
The syntax for compilation into an executable is:

Expand|Select|Wrap|Line Numbers
  1. g++ *file*.cpp -o *executable name*
  2.  
The -o flag tells the compiler to make an executable of name following the -o, which can be run with ./ as normal. Compiling without it just checks for syntactical errors without running the linker, as if you had used the -c flag.

There are a number of other flags, some of which are very handy. Use man g++ for more information, or consult Google.
Even though i compile the file with the same syntax that specified above will not work.I am getting the same error.
Jan 22 '08 #3
ashitpro
542 Expert 512MB
Even though i compile the file with the same syntax that specified above will not work.I am getting the same error.
Check whether "libstdc++.so.5" is present in /usr/lib or /usr/local/lib
If it is not there reinstall g++.
If it is there then check out the permissions.
Jan 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Fabio Pliger | last post by:
Hi, is it possibile, in python, to check for an already running instance of an application? My problem is that, if my program i running and the user relaunch it, i don't want to open a new...
6
by: Pierre-Yves | last post by:
Hello, I would like to prevent my perl program to be executed several times simultaneously (if the program is already running, I would like to display a message like "another instance of this...
15
by: Andrew Chalk | last post by:
I have just moved a project to my laptop and get the message "Visual Studio ..NET has detected that the specified Web server is not running ASP.NET v1.1. You will be unable to run ASP.NET Web...
3
by: jliusolar | last post by:
Hi I am trying to figure out why an application get this error when I am trying to open the application's asmx file from localhost. I don't have indexing service running(it set as manual and not...
8
by: Alphonse Giambrone | last post by:
I have a small asp.net web app running on a shared host. It uses a Jet (Access) database. I included a routine to compact the database when the application_event fires if it has not been compacted...
0
by: WATYF | last post by:
This is my problem... I have some code that starts a Process and returns it to a variable... (prcBat) At any time while that process is running... I want to be able to Kill it by pressing a...
5
by: mabond | last post by:
Hi recently read a posting and reply about Excel processs still running after the Appliction.Quit was called. Thought I might be able to use the same...
4
by: Michael Malinowski | last post by:
Is there a way to read the directory that the currently running python file is located in? Cheers Mike.
8
by: geert | last post by:
Hi all, I have a mac mini running maocosx 10.5 leopard I want to deploy a django project on. My backend is MySQL, and I have it running as a 64- bit app. Of course, apache2 is also running as...
1
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.