Linux Basic Command - For Storing Compilation Error To File

free web hosting
Free Web Hosting > Computers & Tech > Operating Systems > Linux

Linux Basic Command - For Storing Compilation Error To File

kanade
Ex: Compiling a cpp file using a basic command "g++ filename.cpp" and to run the program use ./a.out, Then to store the compilation error to text file use this command.

g++ test.cpp > log.txt

log.txt contains the compile time errors.

Reply

kanade
If your code is giving core dump or segmentation fault then the easiest way to debug the error is using the gdb and file created by coredump.

example: use this command to compile the code
$ gcc -g -o outfile sample.cpp

use this command to run this.

$ ./outfile -- if you get message segmentation fault or core dump then look for the coredump file created in perticular folder the use following
command to debug it.

$gdb coredumpfilename --- this will display where exactly code is created a dump.

You can use 'bt' command to back trace the error.


enjoy error free coding ............

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : linux, basic, command, storing, compilation, error, file

  1. Why Linux?
    (23)
  2. Choice Of Motherboard For Linux Virtualization
    Who knows which ones work well? (4)
    Virtualization is a relatively arcane subject, but it is one which is very rapidly growing, and
    apparently very "hot" in commercial enterprises. For the hobbyist with multiple computers (I have
    8), it offers the possibility of taking snapshots of running, fully configured applications and
    operating systems, and transferring some or all of them onto a single computer platform. First, it
    saves energy. Second, once the conversion has been made from real hardware to a virtual "guest,"
    the driver problems associated with moving from one hardware platform to another are sol....
  3. Strange Error When Trying To Install Fedora Core 9
    (4)
    Hi all, I tried to install Fedora Core 9 in a VmWare virtual machine under WinXP. I downloaded the
    DVD ISO image and proceeded with the installation. When the process was started since about a
    minute, the following error did show: "The file evince-2.22.1.1-1.fc9.i386.rpm cannot be opened.
    This is due to a missing file, a corrupt package or corrupt media" Fine, I told to myself,
    let's download the ISO image again, this time from a different server, just in case. No joy,
    same error. Tried another couple of times, each one using a different server for the download. Sa....
  4. Linux For Beginners- Easy To Install
    (10)
    Which Linux distru is for beginners and Easy to install?....
  5. Access Linux Box From Windows Machine- Putty Tool
    (2)
    Most of the guys want to access Linux box from Windows machine just to do some programming on the
    command line. The "Putty Tool" is the solution for this. Just google for "Putty" and download this
    small package(less then 1MB) and keep it on your desktop. Just you need to configure the linux
    machine IP on this Putty tool and connect to Linux machine. If you face any problem in configuring
    Linux IP, then let me know, i will help you out. If you think this is help full, please rate this.....
  6. How To Copy File & Folders From Linux To Windows?.
    (12)
    Many face problem while transfering file from Linux to windows and Vise versa. My solution for
    this is "winscp405". Winscp is a windows freeware tool used to copy file from & to Linux machine.
    To get this tool just google for " winscp405" tool and download this small package and install.
    Enjoy working with Linux and windows /tongue.gif" style="vertical-align:middle" emoid=":P"
    border="0" alt="tongue.gif" />....
  7. Some Usefull Linux Basic Commands And Utilities. Please Add To This List If You Know One.
    (0)
    Let me give some usefull linux commands and utilities. Please add to this list if you know.
    Work with tar files. To make tar archive use $ tar -cvf filename.tar
    filename To extract tar archive use $ tar -xvf filename.tar To
    extract tar archive with gz use $ tar -xzvf filename.tar.gz Connect to remote
    system through ssh $ ssh name@ip followed by passwd e.g. ssh
    project@172.16.0.14 passwd: List the file in current directory $ ls -l
    l....
  8. How To Play Music And Movie In Linux? Which Is The Good One?.
    (3)
    How to play Movie and music on linux. I am using fedora and i dont think so any player is specific
    to any one flavour of linux. I have used "MP3 blaster" player, but this you need to play from
    command line. Any other user friendly player pls let me know /rolleyes.gif"
    style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> ......
  9. So, I Want To Try Out Linux.
    What do I need? (9)
    If I want to use Linux, would I need XP or a OS on a LAPTOP already? Or can I just pure boot Linux?
    I've wanted to use Linux for a while, preferably Ubuntu. Unless those are two completely
    different things. /dry.gif" style="vertical-align:middle" emoid=" I don't know, I have never
    used Linux before. /tongue.gif" style="vertical-align:middle" emoid=":P" border="0"
    alt="tongue.gif" /> So, any help?....
  10. What Is Linux
    Introduction to Linux (2)
    QUOTE "Linux" generally refers to an open-source Unix-clone operating system based on the Linux
    kernel, written from scratch originally by Linus Torvalds and other smart people from across the
    web. Although the linux kernel, which interfaces with a computer's hardware, is the core of the
    operating system, many other programs are needed to form a complete operating system. Various
    commercial and non-commercial groups produce Linux-based operating systems containing the kernel,
    all necessary programs, and an installer. These different versions of linux are referr....
  11. Linux?
    (3)
    What is the pros and cons of linux? Does it cost money to get or is it free?....
  12. Diablo 2 In Linux?
    possible or not? (10)
    Hey! Sorry if this should be in the game forum, but it is about a game in Linux. And I need
    help with it /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />
    so I thougt that it belongs to here. So.. Is it possible to install Diablo 2 on Linux using some
    sort of patch, or any special software? Not just diablo. But other games too, that only works on
    Windows. Thanks //Feelay....
  13. What Softwares Should I Get To Linux?
    Need help from all the Gurus out there :P (6)
    Hey! I've just downloaded and installed ubuntu (sorry Yordan. That was the only one that
    didn't need a CD). Now I have some questions. What Anit-virus and Anti-Spyware should I use (or
    don't I need any for Linux?)?. What 2D/3D editor can I use to create/change pictures and things?
    What Audio Editor can I use to create/change songs and things? What Web-broswer can I use for Linux?
    (or can it also use fire-fox?). Is there any MSN for Linux? or does it use something else, that can
    write to people using MSN? And if there is anything else I need to get, I wou....
  14. Getting My Wireless Network Adapter Working On Linux
    (2)
    Well, I recently decided to switch over all my PC's to linux, and was stumped when I tried to
    convert one of my laptops. It has a Dell Wireless 1370 wireless networking mini-pci card, based on a
    broadcom chip. I tried to find a driver on the internet, to no avail. I found NDISWrapper, but
    despite my knowledge of how to set up a web server on linux, I couldn't work out how to use it.
    I found a graphic tool, but it was commercial, which ruined any use for me. I was wondering if
    anyone here knew a free tool that would automatically set it up. A few other things: m....
  15. How Can I Rip A Dvd To My Hard Drive Under Linux?
    more (0)
    There are several simple dvd-ripping tools available. vobcopy can be used. First you'll want to
    mount your dvd (assuming the mount point is /mnt/dvd and is set up in your /etc/fstab): Code:
    $ mount /mnt/dvdThen you can rip the main title using vobcopy: Code: vobcopy -i /mnt/dvdThis
    will rip the main title only, similar to IFO-mode in DVD Decrypter. if you want to rip the entire
    disc preserving structure, use Code: vobcopy -i /mnt/dvd -m.You can also use dvdbackup from the
    dvd-create project to rip dvds in a similar fashion. 2. How can I backup a DVD using f....
  16. General Av Encoding In Linux
    more in linux (0)
    1. Virtualdub and VFW codecs for windows are great. Is there anything like this for linux?
    avidemux2 is an advanced native linux video editing and encoding tool with a GUI interface very
    similar to virtualdub's. It supports many video codecs and output formats. Unlike virtualdub for
    windows it is more difficult for codecs to be supported in avidemux, however since it is not VFW
    based it is free to be much more versatile as far as output formats and advanced video codecs.
    avidemux supports more codecs and formats with every release and is a great application to get s....
  17. Imac Bondi.........which Linux
    (1)
    I have a old Bondi that has enough ram for Linux, I wanted to install Ubanutu....on it, I had
    problems with the firmware, It would'nt regognize the cd drive after I erased the 8.0
    OS......see I didn't have the original disk, I installed Mac 0S 9.0 on it by removing the hard
    drive, and putting it in another Imac......then swapping back, still it won't recognize the CD
    drive when I switched it back, the firmware is being a b!tch......I even tried to update the
    firmware.....do dice. I tried to install the Linux distro, by switching the cd drive from the othe....
  18. How To Install Linux Without A CD or DVD?
    Would like to learn how to use Linux but don't know how to install (11)
    Hey! I've tryed to install linux without a cd (as they said on the website).. But I
    did'nt understand it so good =/ Can anyone please tell me how I can install linux without a CD?
    Any version.. The only thing I need is a fast one (faster than windows).. I am completly new (never
    tried it before) and would want to learn Linux. But thats not easy, if I don't know hoiw to
    install it /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Thanks
    //Feelay....
  19. Virtualization In Linux: A Review Of Four Software Choices
    (4)
    Virtualization is the technique of running a "guest" operating system inside an already-running OS;
    for example, Windows inside Linux, or vice-versa. This article compares four virtualization products
    available for Ubuntu Linux: the free, open source Qemu; the closed-but-free versions of VirtualBox
    and VMware-Server, and the commercial Parallels.
    http://www.techthrob.com/tech/linux_virtualization.php _________________________________
    http://dserban01.googlepages.com/linkedin....abap.basis.html ....
  20. Linux Kernel 2.6.24 Released
    (5)
    The latest stable version of the Linux kernel 2.6.24 has just been released. http://kernel.org/
    This kernel brings a lot of changes (the changelog is HUGE). According to Linus, most of the stuff
    is one-liners, and mostly not very exciting ones at that. There is however a new BroadCom driver,
    b43, a continuation of the existing bcm43xx driver, you will notice a significant performance
    improvement when you switch. _________________________________
    http://dserban01.googlepages.com/linkedin....abap.basis.html ....
  21. Linux And Windows Partitions
    Sharing files back and forth (2)
    Introduction Ok so many of you that use Linux, you probably have Windows installed also,
    probably on another partition (an exception is using Wubi). There is a problem that exists with
    Linux having read-only access to NTFS partitions. A solution to this is to install NTFS-3G or a
    similar package/application, but this only solves half of the problem. The other half of the
    problem is Windows not being able to read an ext2/ext3 partition. If you check your partitions in
    Disk Management, Windows has absolutely zero support for ext3/ext2/linux-swap partitions, displ....
  22. Three Ways To Access Linux Partitions From Windows On Dual-boot Systems
    (5)
    If you have a dual-boot Windows/Linux system, you probably know this problem: you can access files
    from your Windows installation while you are in Linux, but not the other way round. This tutorial
    shows three ways how you can access your Linux partitions (with ext2 or ext3 filesystem) from within
    Windows: http://www.howtoforge.com/access-linux-par...ns-from-windows
    _________________________________ http://dserban01.googlepages.com/linkedin....abap.basis.html ....
  23. Looking For Linux
    2 choices that I will choose - make it easy to install and MAINTAIN (34)
    Ok I have tried Linux before, it was ok, until something with the kernel screwed up and it left me
    with a command line interface that I didn't know what to do. I am looking for 2 different
    distributions of Linux here, my first one is for: (Currently running Windows XP SP2) A computer
    with 512 MB RAM Pentium 4 processor Internet Access GNOME or KDE desktop, doesn't matter Minimal
    command line work!!! Absolutely no command line work when installing. I have tried
    Ubuntu, it was easy enough. Anything easier than Ubuntu and I'll give it a try. M....
  24. Psybnc - Howto
    How to make a psyBNC on Linux (4)
    Installation First, fetch the latest source code from http://www.psybnc.at QUOTE cd wget
    http://www.psybnc.at/download/beta/psyBNC-2.3.2-7.tar.gz tar -zxvf psyBNC-2.3.2-7.tar.gz cd psybnc
    Configuration QUOTE make menuconfig Now go in `Bouncer Config', next set Listening
    Port and Ip. Next select `User' Here you will be able to create a user for your bouncer.
    You must set Ident, Realname and Password, and vhost too. So return to main menu, and choose exit.
    When prompted for saving select Yes. Launching psyBNC QUOTE make ./p....
  25. What Made You Switch To Linux?
    (60)
    I first tried Linux a few years ago, not because I was completely against Windows or anything like
    that, but just because I had some free time on my hands. I started off with Mandrake 9.0 which was
    very user friendly and Windows-like. After reading through a bunch of message boards and learning
    which distros are good for what, I soon realized my current distro was great for Linux noobs. So
    then I decided to try something a little more advanced like Slackware which I knew had a steep
    learning curve. Since then I've been using Slackware as my main OS and couldn'....
  26. Where To Find Notepad++ For Linux ?
    (37)
    I'm searching 2 days ago trying to find notepad++ for linux but i couldn't find it yet,
    does anyone know or have this great software?, ofcourse i have it on windows, but i don't use
    windows so much time, most times i'm on linux so i need it to be run on linux. P.S: i don't
    use WINE so please don't recommend it /smile.gif" style="vertical-align:middle" emoid=":)"
    border="0" alt="smile.gif" /> ....
  27. Grub Error After Reinstalled Winxp
    (11)
    I have Windows XP and Fedora 4 installed in my PC. Grub is the boot loader. Today, I decided to
    reinstall Windows XP. After the installation finished, I boot into fedora 4 with rescue disk. then..
    chroot, grub-install /dev/hda, reboot. but I could not boot into the system. It just show me this,
    grub> There is no option for me to choose. (It uses to have a list.) Then I fdis /mbr, root
    (hd0,0), set(hd0) yes, the grub menu is back. But cannot boot into both system (windows xp and
    Fedora 4) fc4: invalid compressed format (err=1) xp:disk error ,press any key to restart ....
  28. Which Distro Of Linux Is Best For A Windows User ?
    (42)
    After years of using Windows, I have decided to "throw off the chains of corporate oppression" and
    switch to Linux. My main question is this: which free (key word) distro would be best suited for a
    person used to working in Windows, and enjoys gaming?....
  29. What's The Difference Between Linux And Unix?!?
    (15)
    are they even made by the same people...?....
  30. You can Play now in Linux
    These is a list of the games. (26)
    You can Play a greates gameg in linus as: Unreal Tournament Quake 3 Wolfenstein Enemy teritory Medal
    of Honor And Emule Nintendo 64 and Play Station games. He have your property games as: Tux Raser
    Tux Cart Flith of the amazon queen Beneath a Steel Sky and most more.....

    1. Looking for linux, basic, command, storing, compilation, error, file

Searching Video's for linux, basic, command, storing, compilation, error, file
Similar
Why Linux?
Choice Of
Motherboard
For Linux
Virtualizati
on - Who
knows which
ones work
well?
Strange
Error When
Trying To
Install
Fedora Core
9
Linux For
Beginners-
Easy To
Install
Access Linux
Box From
Windows
Machine-
Putty Tool
How To Copy
File &
Folders From
Linux To
Windows?.
Some Usefull
Linux Basic
Commands And
Utilities.
Please Add
To This List
If You Know
One.
How To Play
Music And
Movie In
Linux? Which
Is The Good
One?.
So, I Want
To Try Out
Linux. -
What do I
need?
What Is
Linux -
Introduction
to Linux
Linux?
Diablo 2 In
Linux? -
possible or
not?
What
Softwares
Should I Get
To Linux? -
Need help
from all the
Gurus out
there :P
Getting My
Wireless
Network
Adapter
Working On
Linux
How Can I
Rip A Dvd To
My Hard
Drive Under
Linux? -
more
General Av
Encoding In
Linux - more
in linux
Imac
Bondi.......
..which
Linux
How To
Install
Linux
Without A CD
or DVD? -
Would like
to learn how
to use Linux
but
don't
know how to
install
Virtualizati
on In Linux:
A Review Of
Four
Software
Choices
Linux Kernel
2.6.24
Released
Linux And
Windows
Partitions -
Sharing
files back
and forth
Three Ways
To Access
Linux
Partitions
From Windows
On Dual-boot
Systems
Looking For
Linux - 2
choices that
I will
choose -
make it easy
to install
and MAINTAIN
Psybnc -
Howto - How
to make a
psyBNC on
Linux
What Made
You Switch
To Linux?
Where To
Find
Notepad++
For Linux ?
Grub Error
After
Reinstalled
Winxp
Which Distro
Of Linux Is
Best For A
Windows User
?
What's
The
Difference
Between
Linux And
Unix?!?
You can Play
now in Linux
- These is a
list of the
games.
advertisement




Linux Basic Command - For Storing Compilation Error To File



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE