Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #104843

Re: How to produce standalone executable using Code::Blocks/Clang ?

From BartC <bc@freeuk.com>
Newsgroups comp.lang.c
Subject Re: How to produce standalone executable using Code::Blocks/Clang ?
Date 2017-02-27 12:14 +0000
Organization A noiseless patient Spider
Message-ID <o91531$7b1$1@dont-email.me> (permalink)
References (2 earlier) <20170227011240.c55a6462c9edd21774c2892e@gmail.com> <o8vtqu$39t$1@dont-email.me> <20170227060545.cac5aa4d4c2a2f9ba593b00d@gmail.com> <o90rb8$4vp$1@dont-email.me> <20170227122126.88002682a2bfbfcc21dc7e52@gmail.com>

Show all headers | View raw


On 27/02/2017 11:21, GOTHIER Nathan wrote:
> On Mon, 27 Feb 2017 10:27:55 +0100
> David Brown <david.brown@hesbynett.no> wrote:

>> Yes, dynamically linked code will be a little slower than statically
>> linked code - just like calling functions in a different translation
>> unit can be a little slower than calling functions in the same
>> translation unit (since the compiler has less knowledge for
>> optimisation).  And yet it still makes sense to split projects into
>> multiple files.
>
> Wrong again, you mix dynamic linking with dynamic loading to mislead your
> reader.

What's the difference between dynamic linking and dynamic loading 
according to you?

To me, they both describe what happens at load-time and run-time, long 
after the compiler and linker have done their jobs.

I wouldn't break it down further, except that perhaps loading better 
describes the one-time loading of the whole shared library the first 
time is is needed, and linking might describe the fix-up needed of an 
individual function.

> The only benefit of dynamic linking is saving a ridiculous amount of
> non volatile memory.

Some months ago the disk caching used by Firefox on one of my machines 
had somehow grown without restraints for the best part of a year. It had 
used up some 150GB; not the entire drive, but a big chunk of it.

Deleting the 3 million files generated took 17 HOURS.

Some people seem to think that because storage is so cheap as to be 
practically free, that using it comes without any costs.

>> Raw speed is not everything.  Make sensible judgements about where to
>> make your boundaries, but there are good reasons why people like modular
>> code.
>
> Wrong again, static linking don't prevent modular programming.

My C:/windows directory contains 20,000 .dll files totalling some 14GB. 
Only 1.4% of a 1TB drive, but it would obviously be chaotic if all the 
hundreds of applications that used those dlls decided to statically link 
them in.

A program using features of an OS doesn't need to contain the entire OS 
within itself.

They are called /shared/ libraries for a good reason.

-- 
Bartc

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to produce standalone executable using Code::Blocks/Clang ? MehdiAmini <atorrses@gmail.com> - 2017-02-26 12:01 +0330
  Re: How to produce standalone executable using Code::Blocks/Clang ? fir <profesor.fir@gmail.com> - 2017-02-26 01:55 -0800
    Re: How to produce standalone executable using Code::Blocks/Clang ? fir <profesor.fir@gmail.com> - 2017-02-26 03:35 -0800
  Re: How to produce standalone executable using Code::Blocks/Clang ? David Brown <david.brown@hesbynett.no> - 2017-02-26 14:40 +0100
    Re: How to produce standalone executable using Code::Blocks/Clang ? BartC <bc@freeuk.com> - 2017-02-26 14:13 +0000
      Re: How to produce standalone executable using Code::Blocks/Clang ? David Brown <david.brown@hesbynett.no> - 2017-02-26 17:26 +0100
        Re: How to produce standalone executable using Code::Blocks/Clang ? BartC <bc@freeuk.com> - 2017-02-26 16:56 +0000
          Re: How to produce standalone executable using Code::Blocks/Clang ? David Brown <david.brown@hesbynett.no> - 2017-02-26 19:00 +0100
            Re: How to produce standalone executable using Code::Blocks/Clang ? scott@slp53.sl.home (Scott Lurndal) - 2017-02-27 15:16 +0000
        Re: How to produce standalone executable using Code::Blocks/Clang ? scott@slp53.sl.home (Scott Lurndal) - 2017-02-27 15:12 +0000
          Re: How to produce standalone executable using Code::Blocks/Clang ? David Brown <david.brown@hesbynett.no> - 2017-02-27 16:43 +0100
    Re: How to produce standalone executable using Code::Blocks/Clang ? GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-27 01:12 +0100
      Re: How to produce standalone executable using Code::Blocks/Clang ? BartC <bc@freeuk.com> - 2017-02-27 01:04 +0000
        Re: How to produce standalone executable using Code::Blocks/Clang ? GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-27 06:05 +0100
          Re: How to produce standalone executable using Code::Blocks/Clang ? David Brown <david.brown@hesbynett.no> - 2017-02-27 10:27 +0100
            Re: How to produce standalone executable using Code::Blocks/Clang ? GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-27 12:21 +0100
              Re: How to produce standalone executable using Code::Blocks/Clang ? BartC <bc@freeuk.com> - 2017-02-27 12:14 +0000
                Re: How to produce standalone executable using Code::Blocks/Clang ? GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-27 14:27 +0100
              Re: How to produce standalone executable using Code::Blocks/Clang ? David Brown <david.brown@hesbynett.no> - 2017-02-27 13:55 +0100
      Re: How to produce standalone executable using Code::Blocks/Clang ? Ike Naar <ike@iceland.freeshell.org> - 2017-02-27 08:26 +0000
        Re: How to produce standalone executable using Code::Blocks/Clang ? GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-27 12:25 +0100
          Re: How to produce standalone executable using Code::Blocks/Clang ? Ike Naar <ike@iceland.freeshell.org> - 2017-02-27 15:24 +0000
      Re: How to produce standalone executable using Code::Blocks/Clang ? David Brown <david.brown@hesbynett.no> - 2017-02-27 10:22 +0100
      Re: How to produce standalone executable using Code::Blocks/Clang ? scott@slp53.sl.home (Scott Lurndal) - 2017-02-27 15:20 +0000
        Re: How to produce standalone executable using Code::Blocks/Clang ? fir <profesor.fir@gmail.com> - 2017-02-27 07:45 -0800
          Re: How to produce standalone executable using Code::Blocks/Clang ? fir <profesor.fir@gmail.com> - 2017-02-27 08:12 -0800
    Re: How to produce standalone executable using Code::Blocks/Clang ? MehdiAmini <atorrses@gmail.com> - 2017-02-27 10:54 +0330

csiph-web