LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-12-2011, 04:46 PM   #1
Ganahim
LQ Newbie
 
Registered: Apr 2010
Posts: 10

Rep: Reputation: 0
"Problem" with Dev-Cpp and gcc.


Hello linux people. Im a beginner in C programming, and i'm under the impression that Dev-Cpp uses gcc as its compiler. If this is true, then is there any way to compile my stuff with it manually in the command prompt in windows(vista)? The reason i want to be able to do this is because most C tutorials and books use gcc like this in the examples provided, and it would be easier to follow them if i could do this myself (on windows).

Thanks in advance,

Ganahim
 
Old 02-12-2011, 09:42 PM   #2
macaswell
LQ Newbie
 
Registered: Feb 2011
Posts: 3

Rep: Reputation: 0
No, DevCPP doesn't use gcc. It uses cc, which is the actual C/C++ compiler (gcc uses it too). I would suggest installing Cygwin on your Vista box. Cygwin's run.bin or bin.exe sometimes triggers an antivirus warning, but it's safe (see the cygwin site). Google cygwin.
 
Old 02-13-2011, 12:28 AM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Actually, I believe that Dev-cpp IDE happens to use MinGW compiler (just as, for example, the KDevelop IDE uses gcc).

The mechanics of compiling from the command line are useful ... but not essential.

The important thing is to understand the language, and to understand how it relates to the problems you're trying to solve with the language. You you actually run the compiler, frankly, is more or less irrelevant.

If you're comfortable with Dev-Cpp - then by all means continue using Dev-cpp. I think installing Cygwin would probably be a complete waste of time, unless you had some other compelling reason to use it.

IMHO .. PSM
 
Old 02-13-2011, 09:47 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Ganahim View Post
Im a beginner in C programming, and i'm under the impression that Dev-Cpp uses gcc as its compiler.
If I understand correctly (from a quick look at the web site) Dev-Cpp uses MinGW (as PSM told you).

MinGW is one of the two popular Windows ports of GCC (the other is Cygwin).

So you do have a copy of GCC installed that can be used from the Windows command prompt, provided you have the right path and other environment variables set up.

Quote:
is there any way to compile my stuff with it manually in the command prompt in windows(vista)?
Yes. Have you tried it?

Depending on how MinGW was installed, the path entries and other environment variables it needs (for finding lib and include files) might or might not have been added to system wide environment variables.

I never leave path entries or other environment variable from any compiler install in Windows in the system wide set, because I use too many different compilers on one computer.

I have a special link to command prompt for use with each compiler and that link runs a .bat file each time it opens that command prompt. That .bat file adjusts the path and environment variables as appropriate for that compiler. I think that is the best way to use MinGW from a command prompt. Depending on how you installed MinGW, you might or might not need a .bat file like that to prepare a command prompt window for use with MinGW.
 
  


Reply

Tags
mingw


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] "C preprocessor "/lib/cpp" fails sanity check" every single time. masmddr Linux - Software 3 08-03-2010 10:37 AM
why only "mount /dev/sda /mnt/usb" works and not "mount /dev/sda1..." ? gromot Linux - General 7 05-19-2009 10:18 AM
GCC fails to compile - Chapter 6.14 - C preprocessor "/lib/cpp" fails sanity check jaydoc Linux From Scratch 1 01-28-2009 05:17 PM
How do I switch the labels "/dev/sda1" with "/dev/sda3" vonst Linux - General 10 05-27-2006 10:48 PM
Porting to Fedora gcc 4.0 -parsing backward slash("\") comma(",") code_blew Programming 1 04-26-2006 04:07 PM

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

All times are GMT -5. The time now is 12:08 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