Depending on the libraries, Dev C++ comes with most of the libraries already. They are installed in the correct place when Dev C++ installs. try this:
// HelloWorld.cpp
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!" << endl;
getchar (); // pause
return 0;
}
You should get no errors when you compile and run this. It should display "Hello World!" to the console. Press the Enter key to end the program. if it doesn't do that, uninstall and resinstall Dev C++ and try again, or in some other way try to fix Dev C++. If it does work, we'll need more information on the errors and the code and which libraries you are using.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
The program I posted is a console application. If you created a project in Dev C++ with the above program and chose "Windows Application", I imagine it would give you an error like that since I think (not positive) that Windows Applications wants "main" to be called "WinMain". Try the program I posted as a console application. I'm not too familiar with non-console applications in Windows. Also, I see the words "main.c" in your post. There is an option of C versus C++ when you are creating projects/files in Dev C++. Make sure you check C++ for the program I posted.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
You actually don't even need to do it as a project. Just do this:
File->New->Source File (as opposed to "Project")
Name your file "HelloWorld.cpp", copy and paste my code into it, save it, then from the "Execute" pull-down menu, choose the "Compile & Run" option.
See if that works.
Regarding the 70 errors, it's possible that you created the new program/file, but didn't add that file to the project, and didn't remove the old files from the project. You can create a new project and only add that one file and see what happens. Dev C++ doesn't automatically add new files that you create to the project or remove the old ones. You have to do that yourself.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711