f



using Dev-C++ to compile ONLY C code ?

Hi there,

don't know if it's the right group, but I'll try anyway. Sorry if I'm OT,
anybody can be so patient to tell me the right group ? Thanks :)

Anyway, the question is:

I know I can write C programs using a C++ environment like Dev-C++. However,
I'd like to know if there are some options that allow Dev to ignore C++
syntax and act as a C-only compiler. Is this possible ? And, if not, can
anybody suggest me a free C compiler under Windows ?

Thanks a lot.

-- 
Emanuele Blanco
PGP Key Available - http://studenti.unina.it/~emblanco/key.asc


0
manub (8)
4/8/2004 7:41:14 AM
comp.lang.c 30656 articles. 5 followers. spinoza1111 (3246) is leader. Post Follow

1 Replies
890 Views

Similar Articles

[PageSpeed] 45

"Emanuele Blanco" <manub@despammed.com> wrote:
>Hi there,
>
>don't know if it's the right group, but I'll try anyway. Sorry if I'm OT,
>anybody can be so patient to tell me the right group ? Thanks :)
>
>Anyway, the question is:
>
>I know I can write C programs using a C++ environment like Dev-C++. However,
>I'd like to know if there are some options that allow Dev to ignore C++
>syntax and act as a C-only compiler. Is this possible ? 

<OT>
Since Dev-C++ is in fact an IDE that comes with the MingW port of gcc,
the answer is, of course, yes.  Name your files <name>.c and add the 
following options to the compiler command line in order to invoke gcc 
in C89 conforming mode: 

 -W -Wall -O<n> -std=c89 -pedantic  

Notes: 
 1. replace <n> with a number in [1;3], or s 
 2. -std=c89 replaces the deprecated -ansi option
 3. -std=c99 is possible too, but several C99 features have not 
    been implemented in gcc yet 
   
</OT>

Please direct further implementation specific questions to either 
gnu.gcc.help or the online forum at http://www.bloodshed.net/forum .

For standard C language questions comp.lang.c is however /the/ place 
to ask, just be sure to read the FAQ and welcome message (links 
provided in signature) and lurk for a while before posting.

HTH, good luck
Regards
-- 
Irrwahn Grausewitz (irrwahn33@freenet.de) 
welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt 
clc faq-list  : http://www.faqs.org/faqs/C-faq/faq/ 
clc OT guide  : http://benpfaff.org/writings/clc/off-topic.html
0
irrwahn33 (608)
4/8/2004 8:27:08 AM
Reply: