Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > General
User Name
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!


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

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
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 735

Rep: Reputation: 142Reputation: 142
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
Registered: Jun 2004
Distribution: RH8/Fedora Core 4
Posts: 139

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.


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 > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration