LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 11-03-2018, 10:18 AM   #1
abk4523
Member
 
Registered: Jun 2004
Distribution: RH8/Fedora Core 4
Posts: 138

Rep: Reputation: 15
Question regarding gcc and g++ compiler


I recently installed code::blocks and allegro on a fedora 28 system. I compiled a C sample program to test, but got a warning g++ was not installed. I installed it and everything was fine. I was wondering why a g++ compiler was required when the program was in C. Any ideas?
 
Old 11-03-2018, 06:26 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, PCLinuxOS
Posts: 683

Rep: Reputation: 95
Does the name of the file end in ".c", lower case?

I think upper case .C is considered to be c++.

Regardless, if you can pass the compiler options, try "-x c" to tell it it's c.
 
Old 11-04-2018, 01:14 PM   #3
abk4523
Member
 
Registered: Jun 2004
Distribution: RH8/Fedora Core 4
Posts: 138

Original Poster
Rep: Reputation: 15
It was saved as a lower case ".c" file. Installing the c++ compiler was the only change I made. The only explanation I have is the c compiler doesn't like me. It works now, so no worries.
 
  


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
[SOLVED] [Question] How to compile a gcc compiler for another machine which got no c compiler on it shone27 Linux - Newbie 9 09-28-2011 08:32 PM
gcc cross-compiler config question entz Linux - Software 3 08-16-2011 11:12 AM
gcc compiler optimization question dcfnef Programming 2 01-17-2007 08:58 AM
GCC Compiler Question? Gerardoj Programming 3 09-22-2003 06:06 AM
gcc 3.1 compiler question wrc1944 Linux - Software 26 08-28-2002 04:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 03:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration