 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ryan Styles Guest
|
Posted: Sun Nov 20, 2005 4:38 pm Post subject: Compiler Suggestions |
|
|
I am looking for suggestions for free compilers.
I am fairly new to C/C++ and am still learning, but the MinGW/Dev-C++
combo I am using seems to make even simple programs weigh 800 pounds or
more.
So, can anyone suggest something? Or is it that I am just doing
something wrong? Have a look at this example:
#include <iostream>
#include <time.h>
#include <windows.h>
using namespace std;
int main()
{
int x = 1; // Declare X to be zero
while ( x != 100 ) {
cout << "Count: " << x << endl;
Sleep(1000); // Stop for 1 second
x++; // Increment x
}
cin.get();
}
This compiled to 1.2MB in size. I may be wrong or whatever... but that
is a bit big, isn't it?
Thanks in advance for any help.
|
|
| Back to top |
|
 |
John Harrison Guest
|
Posted: Sun Nov 20, 2005 6:39 pm Post subject: Re: Compiler Suggestions |
|
|
Ryan Styles wrote:
| Quote: | I am looking for suggestions for free compilers.
I am fairly new to C/C++ and am still learning, but the MinGW/Dev-C++
combo I am using seems to make even simple programs weigh 800 pounds or
more.
So, can anyone suggest something? Or is it that I am just doing
something wrong? Have a look at this example:
#include
#include
#include
using namespace std;
int main()
{
int x = 1; // Declare X to be zero
while ( x != 100 ) {
cout << "Count: " << x << endl;
Sleep(1000); // Stop for 1 second
x++; // Increment x
}
cin.get();
}
This compiled to 1.2MB in size. I may be wrong or whatever... but that
is a bit big, isn't it?
Thanks in advance for any help.
|
Most of that is likely to be debugging information. Try turning off
debugging and turning on optimization if you want smaller executables.
john
|
|
| Back to top |
|
 |
Sebastian Wiesner Guest
|
Posted: Sun Nov 20, 2005 7:10 pm Post subject: Re: Compiler Suggestions |
|
|
Once upon a time (Sonntag, 20. November 2005 19:39) John Harrison wrote
some very nice things
| Quote: | Ryan Styles wrote:
I am looking for suggestions for free compilers.
I am fairly new to C/C++ and am still learning, but the MinGW/Dev-C++
combo I am using seems to make even simple programs weigh 800 pounds or
more.
So, can anyone suggest something? Or is it that I am just doing
something wrong? Have a look at this example:
#include
#include
#include
using namespace std;
int main()
{
int x = 1; // Declare X to be zero
while ( x != 100 ) {
cout << "Count: " << x << endl;
Sleep(1000); // Stop for 1 second
x++; // Increment x
}
cin.get();
}
This compiled to 1.2MB in size. I may be wrong or whatever... but that
is a bit big, isn't it?
Thanks in advance for any help.
Most of that is likely to be debugging information. Try turning off
debugging and turning on optimization if you want smaller executables.
|
Parts of that are also the static link libraries for the Windows API that
ship with MinGW.
To the OP:
You should download the Platform SDK from Microsoft and use its header
files and dynamic link libraries.
|
|
| Back to top |
|
 |
Ryan Styles Guest
|
Posted: Sun Nov 20, 2005 7:55 pm Post subject: Re: Compiler Suggestions |
|
|
Thank you both for the information. You've been a great help.
|
|
| Back to top |
|
 |
Ryan Styles Guest
|
Posted: Sun Nov 20, 2005 8:34 pm Post subject: Re: Compiler Suggestions |
|
|
Heh, noticed my typo in the original post.
[code]
int x = 1; // Declare x to be zero
[code]
Yeah, it should've been a zero there and not a 1. I should just copy
and paste next time, eh? :)
|
|
| Back to top |
|
 |
adrian suri Guest
|
Posted: Tue Nov 29, 2005 7:08 pm Post subject: Re: Compiler Suggestions |
|
|
Ryan Styles wrote:
| Quote: | Heh, noticed my typo in the original post.
[code]
int x = 1; // Declare x to be zero
[code]
Yeah, it should've been a zero there and not a 1. I should just copy
and paste next time, eh? :)
I would also recoment the openwacom compiler, very tight code, and is |
being activelly developed, while not totally stl, it is getting their
and one can use stl port with it
Adrian
|
|
| Back to top |
|
 |
Ryan Styles Guest
|
Posted: Tue Nov 29, 2005 9:14 pm Post subject: Re: Compiler Suggestions |
|
|
Thanks for the replies guys, appreciate it.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|