473,499 Members | 1,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running C++ file

ilikesuresh
47 New Member
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 2182
Laharl
849 Recognized Expert Contributor
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
ilikesuresh
47 New Member
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 Recognized Expert Contributor
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
3654
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
10501
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
1930
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
2182
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
1842
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
2162
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
6564
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
1816
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
2758
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
8116
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...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
297
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.