473,388 Members | 1,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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.

Nov 22 '05 #1
6 1392
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 <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.


Most of that is likely to be debugging information. Try turning off
debugging and turning on optimization if you want smaller executables.

john
Nov 22 '05 #2
Once upon a time (Sonntag, 20. November 2005 19:39) John Harrison wrote
some very nice things
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 <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.

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.

john


Nov 22 '05 #3
Thank you both for the information. You've been a great help.

Nov 22 '05 #4
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? :)

Nov 22 '05 #5
Ryan Styles wrote:
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
Nov 29 '05 #6
Thanks for the replies guys, appreciate it.

Nov 29 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jørgen Hermanrud Fjeld | last post by:
On Tue, Aug 26, 2003 at 04:33:17PM -0500, Jeff Epler wrote: > 4. It's possible to write code so that __import__ uses compiler.compile > instead of the written-in-C compiler, but I don't have this...
87
by: H. | last post by:
I am a student taking a machine structures class in a university, which includes learning C. I am looking for a good freeware or shareware compiler which can be used in a "C only" mode. C++ isn't...
12
by: Adem24 | last post by:
// MS-Bug # 999,995 (5 left for 1 million bugs :-) : const double d = DBL_MIN; double v00 = 0.0; bool f00 = v00 d; double v01 = 0.1; bool f01 = v01 d;
2
by: =?Utf-8?B?TUNN?= | last post by:
I am using the compiler: Microsoft.VisualBasic.VBCodeProvider What are the different options I can specify using <providerOption>? So far I have: <system.codedom> <compilers> <compiler...
9
by: Ginu | last post by:
I just installed OPNET and am trying to get it to work with my Visual Studio 2005 compiler. However, when I run my OPNET simulation, I am constantly getting the same error that the compiler cannot...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.