NO

Author Topic: Pelles C versus Visual C++  (Read 11361 times)

Trajecto

  • Guest
Pelles C versus Visual C++
« on: February 19, 2006, 07:39:45 AM »
I just compiled the same exact program, both in Pelles C and MS Visual C++.  The Visual C++ file size is 24.0 KB, the Pelles C size is 9.50 KB. Thank you Pelle!

Chris

kobold

  • Guest
Pelles C versus Visual C++
« Reply #1 on: February 20, 2006, 09:00:51 PM »
It's not a trick, it's a Pelle  :wink:
Was it a win32 or a console application?

Offline Vortex

  • Member
  • *
  • Posts: 797
    • http://www.vortex.masmcode.com
Pelles C versus Visual C++
« Reply #2 on: February 22, 2006, 08:11:56 PM »
Hi Trajecto,

Turning off the C run-time libraries , you can get executables down to 1 Kb with both of the compilers.
Code it... That's all...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Pelles C versus Visual C++
« Reply #3 on: February 22, 2006, 09:18:10 PM »
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Pelles C versus Visual C++
« Reply #4 on: February 22, 2006, 11:46:20 PM »
Hi all,
just to enlarge this topic may I ask the points that lead you to consider a compiler more efficient or an executable better if its dimensions are more reduced?
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Trajecto

  • Guest
Pelles C versus Visual C++
« Reply #5 on: February 23, 2006, 01:36:05 PM »
Thanks! It was just a simple Win32 app test, looking at different compilers for my next project. I consider the size of the app mostly when doing mobile development, but it's important to me for Windows also for download size. Most of my software is delivered as a download.

A growing portion of my downloads are being delivered wirelessly, so size is especially important in that respect.

Trajecto

  • Guest
Pelles C versus Visual C++
« Reply #6 on: February 23, 2006, 01:53:06 PM »
BTW:
I tried the C# OpenGL Lesson one at http://nehe.gamedev.net/ and got this:
http://www.trajectorylabs.com/VS.NETcomplains.gif

The PellesC Win32 version ran great of course.


The .NET exe is smaller but what's the difference if it won't run?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Pelles C versus Visual C++
« Reply #7 on: February 23, 2006, 03:00:01 PM »
Have you tryied SharpDevelop for .NET (with C#, VB.NET and J++.NET)?
http://www.icsharpcode.net/opensource/sd/
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Trajecto

  • Guest
Pelles C versus Visual C++
« Reply #8 on: February 24, 2006, 06:01:25 AM »
Never tried it, it looks decent though. I will definitely give it a try some time.

Right now I've decided to go with Pelles C for the next project.  I want to convert one of my 3D graphics programs over to OpenGL, it looks like Pelles C will be perfect.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Pelles C versus Visual C++
« Reply #9 on: February 24, 2006, 10:33:44 AM »
Of course PellesC is one of the best C compilers available.
Anyway per each work there is the correct tool to use, and .NET could be useful for some GUI or fast and dirty apps.
C is forever.... (or was it diamandos?) :lol:
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Pelles C versus Visual C++
« Reply #10 on: February 24, 2006, 07:46:51 PM »
To Frankie:

Remenber to tell what c# need to work when using one small application.

You need truck for one sixpack.
May the source be with you

Trajecto

  • Guest
Pelles C versus Visual C++
« Reply #11 on: February 25, 2006, 01:31:32 AM »
Frankie - "C is forever" - I love that! Can I use that as my signature?

I am well aware of the overhead with the .NET products, I have Visual Studio 2003. Even with that right now if I wanted to do a quickie Windows app like a  Tip Calculator I would still probably use VB 6.

I write a huge variety of apps across multiple platforms. Whenever I start a project I am first looking at all the available languages/dev environments and what would work best. Sometime even the language itself will have a special feature that will give me an idea for an app that will make me want to use it.

Offline Vortex

  • Member
  • *
  • Posts: 797
    • http://www.vortex.masmcode.com
Pelles C versus Visual C++
« Reply #12 on: February 25, 2006, 09:49:31 AM »
Trajecto,

This thread is focussed on creating small Pelles C executables :

http://smorgasbordet.com/phpBB2/viewtopic.php?t=88&start=0&postdays=0&postorder=asc&highlight=
Code it... That's all...

Trajecto

  • Guest
Pelles C versus Visual C++
« Reply #13 on: February 26, 2006, 01:43:17 AM »
Thanks Vortex,

I just added Getting Started with OpenGL GLUT to the forum under User Contributions:  
http://smorgasbordet.com/phpBB2/viewtopic.php?t=1107

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Pelles C versus Visual C++
« Reply #14 on: February 27, 2006, 11:58:49 PM »
Ok timovjl,
I could say that also the software follows the general rules of physics: nothing could be created and nothing could be destroyed. This means that all the functions and pecularities of the so called visual languages don't comes from nothing. When you use an OOP language (object oriented) it's easy to write 'new' to create an object, but somewhere there should be the code that instructs the system how to create it. This means that much more 'friendly' is the tool much more precompiled libraries it needs. Libraries that becomes even more huge as more 'simple' and 'fast' becomes the programming because someone had to write all the code that you are unaware to call and use.
This could be OK if you can use just what you need, but unfortunately to keep it running you are forced to keep the whole library code. This always lead to huge dimensions of the code also for a simple hello world program.
C language has nothing, you could write a program with just the routines you need. Also the I/O is optional, if you don't need it you could also avoid the use of the standard library (stdlib).
The included example is a simple hello world with nothing included, executable size 2k without any adjustement, simply out from the compiler/linker.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide