LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-06-2017, 09:11 AM   #1
Gary Baker
Member
 
Registered: Mar 2007
Location: Whitsett,NC
Distribution: Slackware 14.1 and MINT 17.1
Posts: 105

Rep: Reputation: 3
Angry Stuck


I loaded g++ and gcc- on my machine. I compiled hello world with one and ran it. It worked fine. I wanted to run the program with gcc- so I deleted the compiled program with rm hello. Now neither will compile a program. What happened?
 
Old 01-06-2017, 10:47 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,595

Rep: Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164
Quote:
What happened?
I assume a rhetorical question. Any error or warning messages? What is the exact command you are using to compile your program?
 
Old 01-06-2017, 12:21 PM   #3
Gary Baker
Member
 
Registered: Mar 2007
Location: Whitsett,NC
Distribution: Slackware 14.1 and MINT 17.1
Posts: 105

Original Poster
Rep: Reputation: 3
I have tried: Gcc hello.c
Gcc hello.cpp
g++ hello.c
g++ hello.cpp
Both programs appear to be working. When you enter them alone they complain about no input files.
 
Old 01-06-2017, 12:22 PM   #4
Gary Baker
Member
 
Registered: Mar 2007
Location: Whitsett,NC
Distribution: Slackware 14.1 and MINT 17.1
Posts: 105

Original Poster
Rep: Reputation: 3
No errors when trying to compile with a file.
 
Old 01-06-2017, 12:25 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,595

Rep: Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164Reputation: 4164
Without the -o option the default compiled program name is a.out.

Last edited by michaelk; 01-06-2017 at 12:30 PM.
 
Old 01-10-2017, 12:34 PM   #6
Gary Baker
Member
 
Registered: Mar 2007
Location: Whitsett,NC
Distribution: Slackware 14.1 and MINT 17.1
Posts: 105

Original Poster
Rep: Reputation: 3
I got it!

Somehow I forgot. It all works now. Much thanks.
 
  


Reply

Tags
g++, gcc


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
Stuck Bjt2 Linux - Newbie 21 02-04-2016 10:49 AM
no support for locale: en_Us.itf8 Stuck found some post but still Stuck!! Suec7832 Linux - Newbie 1 08-30-2011 08:13 AM
Drive stuck, how to I un-stuck it. MikeyCarter Linux - Software 3 08-05-2009 11:57 AM
stuck on what to do.. iamstinke Slackware 8 03-19-2004 05:46 PM
Stuck in X !! ewto Linux - Newbie 3 11-17-2003 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration