tags:

views:

1317

answers:

3

What are the differences between Dev C++ and Visual C++?

  • Dev C++ uses gcc, Visual C++ uses own compiler.
  • Any others?

Correct me if I'm wrong.

I tried to compile a program written in Visual C++ with Dev C++ and it didn't work.

Does anyone have any ideas why?

+1  A: 

You need to show us the code, cpp, we can't offer any really specific advice without knowing more detail on what you're doing. You touched upon one of the differences between MS Visual C++ and Dev C++ (and its cousins also using GCC under the covers). See final two paragraphs for my suggestions.

However, standard C++ programs should compile and run in either so, if you're having troubles, it's likely because you're using some Microsoft-provided stuff that's not in Dev C++. I don't know what this is since I've never used Dev C++ but my first thoughts would be MFC or Win32 API calls.

Dev C++ should be able to link to the Microsoft libraries but you may need to configure that. Visual C++ will almost certainly make that an easily-configured option (or the default) but you'll probably have to work harder to achieve it in a non-MS product.

If you really want to develop programs easily and you're less concerned with free-as-in-speech as opposed to free-as-in-beer software, get your hands on a copy of Visual C++ Express. It's basically the Microsoft IDE for learning purposes at zero cost and you'll find it a more polished product than the others (this is my opinion, others will argue otherwise and they may be right, that's why it's an opinion :-).

If you're more concerned with free-as-in-speech, then Dev C++, Code::Blocks, Eclipse CDT and others, are all excellent compilers. If you're a beginner, you may need help setting them up for nice debugging or accessing Microsoft libraries but it's well worth it in my opinion. Eclipse is my current favorite simply because I do a lot of Java at work and I'm familiar with it but everyone seems to rave about Code::Blocks for C++ work. So, re-iterating my advice, show us the code or the errors that you're getting - it may be blindingly obvious to us once we've seen them.

paxdiablo
A: 

I can second the Code::Blocks recommendation. It's like an open source version of VC++ 6.0, which was probably the highpoint of the VC++ IDEs.

Regarding your question - you need post some code and/or the error messages you are getting.

anon
You're joking right? VC++ 6 was a piece of junk. It had no C++ standards compliance to speak of, it crashed all the time and the debugger was pretty awful. If the best you can say about Code::Blocks is that it is like VC++ 6, then I don't think I would bother thanks
1800 INFORMATION
VC++ 6 came out before the standard, I have never, ever known it to crash and the debugger is great - I know Solaris programmers who used VC++ 6 and then port to Solaris just to take advantage of the debugger.
anon
I used VC 6.0 for years also and found it was far more stable than any recent editions of Visual Studio.
RobS
A: 

Visual C++ uses a common header file for applications made in that environment called stdafx.h (which stands for STandard Application Framework eXtensions). This is probably one of the main reasons it would not compile. Visual C++ is also a much more complete IDE for windows development. The debugger works wonders and is very well integrated in the IDE.

Dev on the other hand is great for starting out. It hasn't been updated in a long time, but for beginners this is great - there are less features there to overwhelm them. Although once developers move on, such features are basically a necessity for productivity enhancement.

John T