[ACCEPTED]-C on Visual Studio-compiler-construction

Accepted answer
Score: 61

well you can use visual studio just fine 11 take a look at here man http://www.daniweb.com/forums/thread16256.html

Go to View Menu 10 select Solution Explorer or CTRL+ ALT +L

Then 9 Select The project that your are developing 8 and right click on that.

Then select the 7 Properties from the submenu.

Then select 6 the Configuration properties from the Tree 5 structure. under that select C/C++ then 4 select Advanced. Now in the right side pane 3 change the property

Compile As from Compile 2 as C++ Code (/TP) to Compile as C Code (/TC)

Finally 1 change your file extensions to .c

Now you configured you Visual Studio to compile C programs

And you can use NetBeans too it could even be more user friendly than Visual Studio download it you wont regret i promise

Score: 12

The problem with learning C within Visual 4 Studio is that you are compiling C using 3 the Visual Studio C++ compiler. You might 2 want to try learning C using the GNU GCC compiler 1 from within the Cygwin environment in Windows.

Score: 11

Answering the purely subject question "recommend 9 me a better C IDE and compiler" I find 8 Ming32w and Code::blocks (now with combined installer) very useful on windows but YMMV as you 7 are obviously used to the MS IDE and are 6 just struggling with C.

May I suggest you 5 concentrate on console applications to get 4 a feel for the language first before you 3 attempt to tie it together with a windows 2 UI which in my experience is the hardest 1 bit of windows development.

Score: 9

Simple and sweet: Console applications 14 (basic C programs using printf and such) are 13 easily and cheaply done with the Tiny C 12 Compiler - a no frills, no gui, complete 11 C complier.

http://bellard.org/tcc/

However, C development is relatively 10 simple on Visual Studio as well. The following 9 instructions will set Visual C++ up as a 8 good C compiler, and it will produce console 7 applications at first, and yo can move up 6 into more complex windows apps as you go.

  1. Get the Visual Studio C++ edition (express is fine)
  2. Start a new project - disable pre-compiled headers (maybe the wizard will let you do this, maybe you'll have to change the compiler settings once inside the project)
  3. Delete everything inside the project.
  4. Create a new "example.c" file with the hello world example
  5. Compile and away you go.

Alternately, get 5 a linux virtual machine, or Cygwin. But 4 as you already have Visual Studio, you might 3 as well stick with what you know.

As an aside, this 2 isn't Atwood learning C finally, is it? No 1 ALTs! ;-D

-Adam

Score: 3

Bloodshed Dev-C++ is the best windows C/C++ IDE 3 IMO: http://www.bloodshed.net/ It uses the GNU compiler set and is 2 free as in beer.

EDIT: the download page 1 for the IDE is here: http://www.bloodshed.net/dev/devcpp.html

Score: 3

As already said, you should check out the 4 VS.net C++ edition, but if you'd like to 3 try something else Eclipse has a C++ edition. You 2 can get more info from http://eclipse.org or check out the 1 distro at http://www.easyeclipse.org/site/distributions/cplusplus.html

Score: 2
The problem with learning C within Visual Studio is that you are compiling C 
using the Visual Studio C++ compiler. You might want to try learning C using
the GNU GCC compiler from within the Cygwin environment in Windows.

This is a legitimate response, I posted 7 an IDE that uses the GNU compilers, so why 6 has he been down modded?

This is the type 5 of thing that will make me not use SO, why down 4 mod someone just because they are recommending 3 a different compiler, and IMHO, a better 2 one then Microsoft's?

get real people, and 1 @Antonio Haley I gave you +1

Score: 1

Some people say that a smaller IDE is better 12 for learning. Take a look at Code::Blocks. It's generally 11 true that beginning C in an IDE is hard 10 because not many books explain enough to 9 control the IDE. Perhaps starting in a console 8 and a basic text editor with syntax highlighting 7 would be better – at least under Linux. Since 6 Windows' console is far from great, I'd 5 not recommend using it.

/EDIT: Dev-C++ used 4 to be the best freely available IDE for 3 Windows. However, it's development has been 2 discontinued years ago and the most recent 1 version unfortunately is full of bugs.

Score: 1

There's a very good reason to learn C and 13 C++. The reason is that there's a lot of 12 C and C++ code out there that are performing 11 very real and important tasks. Someone who 10 considers themselves a programmer and a 9 learner(doubtful that you can separate the 8 two) can learn a lot from these lines of 7 code.

You can learn a lot from each language 6 by studying the other, but if you really 5 want to grok C it's a lot easier to separate 4 yourself from anything C++ for a while. Visual 3 C++ is great but GCC is a great way to thrust 2 yourself into vanilla ANSI C without having 1 to mentally sidestep any C++.

@mmattax thanks!

Score: 1

C in Visual Studio is fine, just use the 7 command line compiler that is included in 6 the Pro edition. Yes its the C++ compiler 5 but treats all files ending .c as C . You 4 can even force it to treat ALL files as 3 C with a switch. The VS documentation has 2 entries on it, just search the index for 1 Visual C.

Score: 1

Visual Studio is one of the best IDEs for 6 C/C++. I don't think it is complicated and 5 hard to use - if you have questions about 4 it - ask them. Some other compilers/IDEs 3 are fine too, but if already have Visual 2 Studio and have used it - why not stick 1 to it?

Score: 1

For plain C, I suggest Pelles C. Generates optimized 1 code and supports C99 constructs.

Features:

  • Support for 32-bit Windows (X86),
  • 64-bit Windows (X64), and Windows Mobile (ARM). Support for the C99 standard.
  • Integrated source code editor with call tips and symbol browsing. Integrated source-level debugger. Project management.
  • Inline assembler for X86 and ARM.
  • Integrated resource editor. Integrated bitmap, icon and cursor editor. Integrated animated cursor and video editor.
  • Integrated hex-dump editor.
  • Supportfor custom controls in the dialog editor. Support for custom project wizards. http://www.smorgasbordet.com/pellesc/
Score: 1

When i used visual studio 5.0 it should 31 compile c code as long as the header files 30 and lib. are there for the compiler to find. In 29 fact most C++ compilers like G++ will compile 28 C code just fine. But i'm not sure how well.. If 27 you are targeting a platform then you can 26 change the header files and lib. within 25 you IDE and Compiler.

Visual Studio has 24 a great debugger that no other Compiler 23 that i have seen can compete with. I have 22 been using gcc darwin10 4.2.1 and find the 21 debugger is basically just the one you can 20 getfree with any linux flavor. I recommend 19 you learn both on a plain vanilla gcc compiler 18 and also try visual studio which costs money. The 17 express edition does not allow the use of 16 threading and several other things that 15 I forgot about. Visual Studio 5.0 should 14 be ok to use and the debugger is much more 13 human friendly then the one commandline 12 version called GDB. Try DDD on linux which 11 is similar to XCODE's debugger.

Although 10 C++ and C are different you can compile 9 both together. But you should understand 8 each ones flaws and good points. C code 7 is faster, but C++ is much easier to write 6 and manage larger code. C++ is object oriented 5 but C is procedural while they are both 4 imperative languages. I would suggest learning 3 objective-C since you can use both C++ and 2 C libraries. Using the features you like 1 in all three languages!!!

Score: 0

Visual Studio or Express do consider .c 7 files as C code, but the compiler will keep 6 giving warnings, and irritating suggestions 5 which you do not require, in the debugger. Gives 4 an indication that Visual C++, as the name 3 suggests is optimized for C++ development 2 for the Windows Operating system, which 1 was originally written in plain pure C.

More Related questions