Hi,

I am on Windows xp professional edition and looking for a free develeopment tool/ide for some self c++ learning. The one I can across is Dev-C++ 5 (currently beta) from

http://www.bloodshed.net/devcpp.html

It is supported on XP but it is still beta version and I want something stable. Can any one please help me find one? I want a package which hopefully contains all the compilers+libraties+debugging tool etc. so that after the installtion I am just ready to write and run. Thanks.

Recommended Answers

All 22 Replies

Member Avatar for iamthwee

>It is supported on XP but it is still beta version and I want something stable

nonsense :lol:

>I am on Windows xp professional edition and looking for a free
>develeopment tool/ide for some self c++ learning.
Most of the good compilers come with an IDE and are freely available.

>but it is still beta version and I want something stable.
I haven't noticed any instability in the beta version of Dev-C++.

>I want a package which hopefully contains all the compilers+libraties+debugging tool
>etc. so that after the installtion I am just ready to write and run.
I usually recommend either Turbo C++ (the new one, not the crappy ancient one) or Visual C++ 2005 Express.

yeah ive been running the beta on xp for years and its fine

Hi,

Thanks for the replies earlier, just downloaded the -Dev-C++ 5 from:

http://www.bloodshed.net/devcpp.html

I installed it with all the features just to make sure it works well. The thing is I have one project called Project1 and under this project there are two different files, first.cpp and second.cpp.

The first one has the following code:

#include <iostream>
 
using namespace std;
 
int main()
{
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
  cin.get();
}

The second one has the following code:

#include <iostream> 
 
using namespace std;
 
int main()                            // Most important part of the program!
{
  int age;                            // Need a variable...
 
  cout<<"Please input your age: ";    // Asks for age
  cin>> age;                          // The input is put in age
  cin.ignore();                       // Throw away enter
  if ( age < 100 ) {                  // If the age is less than 100
     cout<<"You are pretty young!\n"; // Just to show you it works...
  }
  else if ( age == 100 ) {            // I use else just to show an example 
     cout<<"You are old\n";           // Just to show you it works...
  }
  else {
    cout<<"You are really old\n";     // Executed if no other statement is
  }
  cin.get();
}

When I compile the first one or the second one, there comes an error message underneath the code window saying " multiple definition of `main' " and here are the last few lines of the compiler log:

first.o(.text+0x100):first.cpp: first defined here
collect2: ld returned 1 exit status
make.exe: *** [Project1.exe] Error 1
Execution terminated

Do not know what I am doing wrong here. Any suggestions? Thanks.

did you download the correct version?

theres a small one without the compiler and a big one with it

did you download the correct version?

theres a small one without the compiler and a big one with it

Yes I think so I have downloaded the one with with Mingw/GCC .
Here are the details:

Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB</I>) with Mingw/GCC 3.4.2</I>
Dev-C++ version 4.9.9.2, includes full Mingw compiler system with GCC 3.4.2 and GDB 5.2.1 See NEWS.txt for changes in this release.


http://www.bloodshed.net/dev/devcpp.html

yeah thats the one i have. it works just fine for me...

does any of the example apps that you can choose from in the new project menu compile ok?

yeah thats the one i have. it works just fine for me...

does any of the example apps that you can choose from in the new project menu compile ok?

If I delete the second file named second.cpp from the project and try to compile and run the first one called first.cpp it compiles and runs well. The problem only comes when I try to add the second file to the same project and compile+run it. I did install every thing though.

There's a C++ entity for Eclipse as well.
Haven't used it, so can't tell if it's good or not.

You have two separate programs, so you might have to create two separate projects.

Code::Blocks would be good if you want an nice to look at interface.

But if you are planning to develop only win32 programs then I suggest you get Visual C++ 2005. That's a really good IDE and is very easy to use once you get the basics.

Hi,

Thanks for the replies earlier, just downloaded the -Dev-C++ 5 from:

http://www.bloodshed.net/devcpp.html

I installed it with all the features just to make sure it works well. The thing is I have one project called Project1 and under this project there are two different files, first.cpp and second.cpp.

The first one has the following code:

#include <iostream>
 
using namespace std;
 
int main()
{
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
  cin.get();
}

The second one has the following code:

#include <iostream> 
 
using namespace std;
 
int main()                            // Most important part of the program!
{
  int age;                            // Need a variable...
 
  cout<<"Please input your age: ";    // Asks for age
  cin>> age;                          // The input is put in age
  cin.ignore();                       // Throw away enter
  if ( age < 100 ) {                  // If the age is less than 100
     cout<<"You are pretty young!\n"; // Just to show you it works...
  }
  else if ( age == 100 ) {            // I use else just to show an example 
     cout<<"You are old\n";           // Just to show you it works...
  }
  else {
    cout<<"You are really old\n";     // Executed if no other statement is
  }
  cin.get();
}

When I compile the first one or the second one, there comes an error message underneath the code window saying " multiple definition of `main' " and here are the last few lines of the compiler log:

first.o(.text+0x100):first.cpp: first defined here
collect2: ld returned 1 exit status
make.exe: *** [Project1.exe] Error 1
Execution terminated

Do not know what I am doing wrong here. Any suggestions? Thanks.

A project can have only one entry point i.e. only a single definition of main or Winmain. Where do you expect the compiler to start the execution from when you have declard two entry points ?

The structure of your project should be something like :

Driver.cpp (containing the main function)
Class1.h
Class1.cpp (implementation of Class1.h, doesn't contain main)
...so on

So how well does Code Blocks work?

pretty well. Basically dev c++ with a lot of the features from VC

When I compile the first one or the second one, there comes an error message underneath the code window saying " multiple definition of `main' "

Do not know what I am doing wrong here. Any suggestions? Thanks.

Having two files in the project, both with function main( ), will cause this. You cannot have two functions with that name, as main( ) is the defined start point for the resulting program.

Remove one file from the project and try building it.

So you revived a 16 month old thread just to say "I will try it!"..

Hi,

Thanks for the replies earlier, just downloaded the -Dev-C++ 5 from:

http://www.bloodshed.net/devcpp.html

I installed it with all the features just to make sure it works well. The thing is I have one project called Project1 and under this project there are two different files, first.cpp and second.cpp.

The first one has the following code:

#include <iostream>
 
using namespace std;
 
int main()
{
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
  cin.get();
}

The second one has the following code:

#include <iostream> 
 
using namespace std;
 
int main()                            // Most important part of the program!
{
  int age;                            // Need a variable...
 
  cout<<"Please input your age: ";    // Asks for age
  cin>> age;                          // The input is put in age
  cin.ignore();                       // Throw away enter
  if ( age < 100 ) {                  // If the age is less than 100
     cout<<"You are pretty young!\n"; // Just to show you it works...
  }
  else if ( age == 100 ) {            // I use else just to show an example 
     cout<<"You are old\n";           // Just to show you it works...
  }
  else {
    cout<<"You are really old\n";     // Executed if no other statement is
  }
  cin.get();
}

When I compile the first one or the second one, there comes an error message underneath the code window saying " multiple definition of `main' " and here are the last few lines of the compiler log:

first.o(.text+0x100):first.cpp: first defined here
collect2: ld returned 1 exit status
make.exe: *** [Project1.exe] Error 1
Execution terminated

Do not know what I am doing wrong here. Any suggestions? Thanks.

Think of a 'project' as a bunch of files that are all compiled, and linked together to make a binary. You obviously cannot have two mains in a single application.

Simply put, your first.cpp and second.cpp don't belong in the same project together. Moreover, in Dev-C++, you don't have to make a project unless you need to. Close your project, open your files, compile, and run.

Any suggestions for the below questions? I am looking for a free and not a trial/time based copy.

Free C IDE for Windows XP Home edition?
Free C++ IDE for Windows XP Home edition?
Free Java IDE for Windows XP Home edition?
Free PHP IDE for Windows XP Home edition?
Free JavaScript IDE for Windows XP Home edition?

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.