LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-16-2004, 02:38 AM   #1
xviddivxoggmp3
Member
 
Registered: Feb 2004
Location: scanf
Distribution: Redhat Enterprise 4.4 AS
Posts: 236

Rep: Reputation: 30
gcc and creating a debug file


is there any switch you place after the gcc to make it create a file on the a: drive that has all the compiler errors?

syntax similar to

gcc [switch] [file path and name]
 
Old 03-16-2004, 03:03 AM   #2
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 418

Rep: Reputation: 31
Assuming your a: drive is mounted at /mnt/floppy

Code:
gcc filetocompile.c &> /mnt/floppy/errors
Thats the simplist route I can see, since "errors" will only have content when something
goes wrong, unless of course you use a switch like -v , in that case all messages will be
sent to "errors".

Last edited by jinksys; 03-16-2004 at 03:05 AM.
 
Old 03-16-2004, 03:04 AM   #3
hypexr
Member
 
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115

Rep: Reputation: 16
I think that gcc filename 2>/mnt/floppy/error_log might be what you are looking for.

Last edited by hypexr; 03-16-2004 at 03:05 AM.
 
Old 03-16-2004, 03:07 AM   #4
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 418

Rep: Reputation: 31
Quote:
Originally posted by hypexr
I think that gcc filename 2>/mnt/floppy/error_log might be what you are looking for.

For some reason hypexr, that doesnt work with GCC. It seems it doesnt send errors to
STDERR, (at least it doesnt on my machine) thats why I used &> to send all messages to error since gcc usually only whines when something blows up.

 
Old 03-16-2004, 12:53 PM   #5
hypexr
Member
 
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115

Rep: Reputation: 16
Works on my system, but thanks, thats good information to know.
 
Old 03-16-2004, 03:38 PM   #6
xviddivxoggmp3
Member
 
Registered: Feb 2004
Location: scanf
Distribution: Redhat Enterprise 4.4 AS
Posts: 236

Original Poster
Rep: Reputation: 30
To expand on this concept.
I'm assuming that you can send this to a mounted network drive?
Is this valid?
I do not have the capability of testing this, so I do appologize for the question.
What about across the internet on a remote machine?

Last edited by xviddivxoggmp3; 03-16-2004 at 03:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
when creating a *.iso file, how to make the file size smaller? minm Linux - Newbie 8 12-26-2004 09:58 PM
Redirecting debug info to another file subu_s Programming 1 12-07-2004 01:15 PM
Creating executables with gcc punk_roks11 Linux - Newbie 2 07-28-2004 12:00 AM
Creating makefiles and using gcc???? darkone66669 Linux - Software 3 03-21-2004 05:23 PM
creating a flat binary file with gcc wsimmons Programming 2 01-08-2002 11:33 AM


All times are GMT -5. The time now is 09:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration