Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #63934 > unrolled thread
| Started by | bilsch <bilsch01@gmail.com> |
|---|---|
| First post | 2015-06-23 07:40 -0700 |
| Last post | 2015-07-21 12:47 +0200 |
| Articles | 20 on this page of 130 — 29 participants |
Back to article view | Back to comp.lang.c
OT - gcc for Windows not being recognized by Windows 7 bilsch <bilsch01@gmail.com> - 2015-06-23 07:40 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-23 15:48 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 bilsch <bilsch01@gmail.com> - 2015-06-23 08:15 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-23 17:46 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2015-06-23 17:00 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 fir <profesor.fir@gmail.com> - 2015-07-05 01:55 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Keith Thompson <kst-u@mib.org> - 2015-06-23 15:18 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 00:43 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Tim Prince <tprince@computer.org> - 2015-06-23 18:54 -0400
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 09:56 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-24 09:34 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 09:58 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-24 11:21 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 11:27 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 13:41 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-24 13:14 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 14:24 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-24 13:37 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 16:32 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2015-06-24 13:33 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 16:34 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 13:25 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-24 19:03 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 19:28 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-24 19:52 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 19:57 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-24 21:36 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 22:06 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-25 08:05 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-25 10:11 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-06-25 03:25 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-25 12:49 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-06-25 13:21 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 James Kuyper <jameskuyper@verizon.net> - 2015-06-25 12:35 -0400
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 17:42 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 James Kuyper <jameskuyper@verizon.net> - 2015-06-25 13:09 -0400
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 18:31 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 James Kuyper <jameskuyper@verizon.net> - 2015-06-25 13:44 -0400
Re: OT - gcc for Windows not being recognized by Windows 7 jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-26 07:32 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-26 11:51 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-26 11:19 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-26 11:54 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-26 12:46 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-26 13:31 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-26 14:35 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-26 14:21 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-26 14:37 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-26 15:19 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 David Kleinecke <dkleinecke@gmail.com> - 2015-06-26 10:10 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-26 21:05 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-06-26 14:05 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-26 20:42 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-06-26 15:07 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-26 21:43 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-06-26 16:40 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-26 23:21 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-06-26 22:37 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-06-26 18:25 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Stephen Sprunk <stephen@sprunk.org> - 2015-06-26 15:14 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-26 15:30 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-26 14:38 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-06-25 21:27 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-26 11:54 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-26 07:30 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-06-25 17:48 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-06-25 14:59 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 David Kleinecke <dkleinecke@gmail.com> - 2015-06-25 08:10 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 fir <profesor.fir@gmail.com> - 2015-07-05 01:45 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 fir <profesor.fir@gmail.com> - 2015-07-05 06:35 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-05 06:47 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 15:34 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-07-05 11:20 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 17:50 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-05 10:29 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-07-05 12:49 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 19:19 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Martin Shobe <martin.shobe@yahoo.com> - 2015-07-05 14:22 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Geoff <geoff@invalid.invalid> - 2015-07-05 12:49 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-05 21:05 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-07-05 15:38 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 22:38 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 fir <profesor.fir@gmail.com> - 2015-07-05 17:18 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Keith Thompson <kst-u@mib.org> - 2015-07-05 18:23 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-07-06 02:43 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-06 10:27 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-06 20:13 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 "Charles Richmond" <numerist@aquaporin4.com> - 2015-07-07 15:18 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-07-07 13:31 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-07 21:16 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 fir <profesor.fir@gmail.com> - 2015-07-05 02:04 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 fir <profesor.fir@gmail.com> - 2015-07-05 01:33 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 13:35 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 13:04 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 raltbos@xs4all.nl (Richard Bos) - 2015-07-03 17:36 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-03 19:22 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-03 23:37 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 00:58 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Ian Collins <ian-news@hotmail.com> - 2015-07-05 14:58 +1200
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 11:41 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 11:50 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2015-07-05 12:18 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-07-20 16:40 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2015-07-05 12:20 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-07-20 16:43 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-20 16:03 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-07-21 12:42 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Robert Wessel <robertwessel2@yahoo.com> - 2015-07-21 14:36 -0500
Re: OT - gcc for Windows not being recognized by Windows 7 Geoff <geoff@invalid.invalid> - 2015-07-05 11:30 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Melzzzzz <mel@zzzzz.com> - 2015-07-05 21:08 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 20:26 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-07-05 15:45 -0400
Re: OT - gcc for Windows not being recognized by Windows 7 Melzzzzz <mel@zzzzz.com> - 2015-07-05 21:57 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2015-07-05 21:28 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-05 23:39 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-07-05 23:39 -0400
Re: OT - gcc for Windows not being recognized by Windows 7 Bartc <bc@freeuk.com> - 2015-07-06 12:56 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2015-07-06 12:58 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-07-06 09:55 -0400
Re: OT - gcc for Windows not being recognized by Windows 7 Richard Kettlewell <rjk@greenend.org.uk> - 2015-07-06 16:26 +0100
Re: OT - gcc for Windows not being recognized by Windows 7 Phil Carmody <pc+usenet@asdf.org> - 2015-07-08 19:55 +0300
Re: OT - gcc for Windows not being recognized by Windows 7 Ian Collins <ian-news@hotmail.com> - 2015-07-06 10:39 +1200
Re: OT - gcc for Windows not being recognized by Windows 7 luser droog <luser.droog@gmail.com> - 2015-07-05 20:30 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-07-20 16:28 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 raltbos@xs4all.nl (Richard Bos) - 2015-06-24 10:04 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 David Brown <david.brown@hesbynett.no> - 2015-06-24 13:42 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 Rosario19 <Ros@invalid.invalid> - 2015-06-24 09:22 +0200
Re: OT - gcc for Windows not being recognized by Windows 7 "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-05 11:56 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 Geoff <geoff@invalid.invalid> - 2015-07-05 12:52 -0700
Re: OT - gcc for Windows not being recognized by Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2015-07-05 20:40 +0000
Re: OT - gcc for Windows not being recognized by Windows 7 Lőrinczy Zsigmond <zsiga@nospam.for.me> - 2015-07-21 12:47 +0200
Page 4 of 7 — ← Prev page 1 2 3 [4] 5 6 7 Next page →
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-06-26 14:38 +0100 |
| Message-ID | <mmjki4$12s$2@dont-email.me> |
| In reply to | #64227 |
On 26/06/15 14:30, jacobnavia wrote: > Le 26/06/2015 12:19, Richard Heathfield a écrit : > >> Right. This is strongly related to the point I was making up-thread, in >> response to a complaint about file proliferation. With such a linker, if >> you have a lot of functions in one library file, you're going to get a >> bigger executable image *if* some of those functions aren't actually >> used within the program, which is why (as you say) some library authors >> insist on putting as small a number of functions in a file as is >> sensible, and... here's the point... this is bound to increase the >> number of files in the project. Obviously it's harder to manage more >> files than it is to manage fewer files, but equally obviously there's a >> benefit from having smaller executable images, so - as so often happens >> in programming - it's a trade-off. >> > > It is simple. If you are writing a library, put as few functions as > possible in each file. If you are writing an application put as much > related function as possible. > > For instance, I have hundreds of files for the c library of lcc-win, > each quite small. For the IDE however, I have only 25 files, with huge > files of more than 100K each. Why? > > Faster compile times since <windows.h> is included ONCE per file and it > represents most of the processing time (it makes around 4-5MB of source > code) > >> As an aside, it isn't necessarily the case that even the most >> space-stingy of developers will only put one function in a file. For >> example, I would be surprised to see a single .c file with code for >> creating an object, and another .c file with code for destroying it. You >> can't destroy an object that you haven't created, and you shouldn't >> create an object that you won't destroy, so it makes sense to put both >> functions in the same file. > > Right. malloc/free/calloc share one file. If you use malloc you need > free, if you use fopen it is highly likely that fclose will be needed too. Jacob, we really must stop agreeing like this. People will talk. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2015-06-25 21:27 -0500 |
| Message-ID | <d1epoad4k545dicqhs6blo9pf5r69ic22l@4ax.com> |
| In reply to | #64135 |
On Thu, 25 Jun 2015 17:42:04 +0100, Richard Heathfield <rjh@cpax.org.uk> wrote: >On 25/06/15 17:35, James Kuyper wrote: >> On 06/25/2015 02:05 AM, jacobnavia wrote: >>> Le 24/06/2015 23:06, Richard Heathfield a écrit : >>>> (Is it still the case that linkers can only pull library code out at an >>>> object-file level? I don't know.) >>> >>> My linker doesn't. I just pull all the object file since it is very >>> difficult to determine from the linker standpoint what is needed and >>> what is not.. A global symbol could be referenced from some function >>> pointer somewhere, then it could pull in other symbols etc. >> >> That comment confuses me, being inconsistent with my understanding >> (limited as it is) of how linkage works. If I write code like the following: >> ><snip - see parent article for full text if you need it> >> >> What am I misunderstanding about this process that makes it so difficult >> that you prefer to pull all of the object files from a library? > >I don't *think* that's what he said. I *think* he said "pull all the >object file" as opposed to "pull from the object file only those >functions and objects that are required for the program". Somewhere, someplace, I ran across a compiler that had an option to separate the object modules into much smaller sections (basically one function per object), specifically to help linkers minimize the included size from libraries. For the life of me I don't remember where…
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2015-06-26 11:54 +0200 |
| Message-ID | <mmj7eq$ikb$1@dont-email.me> |
| In reply to | #64193 |
On 26/06/15 04:27, Robert Wessel wrote: > On Thu, 25 Jun 2015 17:42:04 +0100, Richard Heathfield > <rjh@cpax.org.uk> wrote: > >> On 25/06/15 17:35, James Kuyper wrote: >>> On 06/25/2015 02:05 AM, jacobnavia wrote: >>>> Le 24/06/2015 23:06, Richard Heathfield a écrit : >>>>> (Is it still the case that linkers can only pull library code out at an >>>>> object-file level? I don't know.) >>>> >>>> My linker doesn't. I just pull all the object file since it is very >>>> difficult to determine from the linker standpoint what is needed and >>>> what is not.. A global symbol could be referenced from some function >>>> pointer somewhere, then it could pull in other symbols etc. >>> >>> That comment confuses me, being inconsistent with my understanding >>> (limited as it is) of how linkage works. If I write code like the following: >>> >> <snip - see parent article for full text if you need it> >>> >>> What am I misunderstanding about this process that makes it so difficult >>> that you prefer to pull all of the object files from a library? >> >> I don't *think* that's what he said. I *think* he said "pull all the >> object file" as opposed to "pull from the object file only those >> functions and objects that are required for the program". > > > Somewhere, someplace, I ran across a compiler that had an option to > separate the object modules into much smaller sections (basically one > function per object), specifically to help linkers minimize the > included size from libraries. For the life of me I don't remember > where… > <https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ffunction-sections-1115> <http://elinux.org/Function_sections> I'm guessing other compilers can do the same thing.
[toc] | [prev] | [next] | [standalone]
| From | jacobnavia <jacob@jacob.remcomp.fr> |
|---|---|
| Date | 2015-06-26 07:30 +0200 |
| Message-ID | <558CE358.3010507@jacob.remcomp.fr> |
| In reply to | #64135 |
Le 25/06/2015 18:42, Richard Heathfield a écrit : > On 25/06/15 17:35, James Kuyper wrote: >> On 06/25/2015 02:05 AM, jacobnavia wrote: >>> Le 24/06/2015 23:06, Richard Heathfield a écrit : >>>> (Is it still the case that linkers can only pull library code out at an >>>> object-file level? I don't know.) >>> >>> My linker doesn't. I just pull all the object file since it is very >>> difficult to determine from the linker standpoint what is needed and >>> what is not.. A global symbol could be referenced from some function >>> pointer somewhere, then it could pull in other symbols etc. >> >> That comment confuses me, being inconsistent with my understanding >> (limited as it is) of how linkage works. If I write code like the >> following: >> > <snip - see parent article for full text if you need it> >> >> What am I misunderstanding about this process that makes it so difficult >> that you prefer to pull all of the object files from a library? > > I don't *think* that's what he said. I *think* he said "pull all the > object file" as opposed to "pull from the object file only those > functions and objects that are required for the program". > Exactly Again: I do not pull all the object files of a library. I just pull the object file where the reference appears. But I pull ALL of that object file, including things that maybe are not needed. For instance: int a; int b; If a is used elsewhere I will pull a AND b also since it is in the same file.
[toc] | [prev] | [next] | [standalone]
| From | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
|---|---|
| Date | 2015-06-25 17:48 +0000 |
| Message-ID | <mmheta$4q7$1@speranza.aioe.org> |
| In reply to | #64133 |
James Kuyper <jameskuyper@verizon.net> wrote:
(snip on linkers and resolving references)
> That comment confuses me, being inconsistent with my understanding
> (limited as it is) of how linkage works. If I write code like the following:
> void (*f)(void) = external_function;
> I expect the object file to contain a record indicating that
> external_function is a external reference that must be resolved. I
> expect the linker to find that record, and search for an object module
> in the provided libraries that contains a record indicating that it
> provides an eternal definition for that function, and to load that
> module (and only that module) from whichever library it's in. I expect
> that object module to itself contain records listing any other external
> symbols that external_function() itself connects to, and for the linker
> to recursively track down those references too.
> What am I misunderstanding about this process that makes it so difficult
> that you prefer to pull all of the object files from a library?
Modules can have more than one entry point. C doesn't allow for it,
but Fortran, PL/I, and of course assembly programs can.
It is, for example, usual for SIN and COS to be two entry points
into the same routine. The argument reduction is done based on the
entry point, and then the appropriate polynomial is evaluated.
Also, log() and log10(), though the actual effect is at the end.
If many functions are interdependent, they can go into a single
entry in the library, the linker will pull them in together, and
process them accordingly.
> For the typical program that I write, which uses only a few
> modules (directly or indirectly) from each of several huge
> libraries, I'd expect your linker's approach to make the
> resulting program dozens of times bigger than it needed to be.
In the days of software floating point, it was usual not to load
the floating point routines for programs that didn't do any floating
point operations. Since printf() doesn't know until it reads the
format string, which may contain %d, %e, %f, or %g, it was usual
not to automatically load them.
Some linkers have weak external reference, such that it doesn't
pull a library entry, but will resolve if some other reference does.
Someone could:
printf("%f",(double) 2);
or even:
printf("%f",0x30100000, 0x00000000);
(if they know how things are stored on the stack).
But better not to do that.
-- glen
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-06-25 14:59 +0100 |
| Message-ID | <mmh1e3$d0j$1@dont-email.me> |
| In reply to | #64100 |
On 24/06/2015 22:06, Richard Heathfield wrote: > On 24/06/15 21:36, Bartc wrote: >> On the other hand, I've seen not particularly big C programs more >> recently that were exasperating to try and follow because the authors >> split them up into dozens of tiny modules and headers. > > As is so often the case in programming, there is a balance to be struck. > > Note, though, that tiny modules have historically been advantageous in > the building of libraries, insofar as some linkers have worked on the > principle of adding to an executable image all the *object files* it > needs from a library - so putting each function in its own object file > had a real and beneficial impact on the size of the executable image. > (Is it still the case that linkers can only pull library code out at an > object-file level? I don't know.) As I understood how linkers worked, they extracted only the functions that were needed out of libraries (and the functions /those/ needed, and so on). That probably explains why it was a slow process. Putting every function into a separate object file might make it a little simpler, but it would also be crazy; the linker would grind to a halt. When I had to write the equivalent of a linker in the eighties, I decided to just eliminate it altogether. Instead I had a 'loader', which just took *all* the object files specified and created the executable from those. That could be done as fast as the disk allowed, usually a fraction of a second. (It helped that I only had my own libraries and that they were all needed.) I don't know how they work now. But I understand the 'linking' process is open to interpretation, and I can think of several ways of achieving the same results, some of which involve delving into the complexities of object and executable file formats, and some don't. (But linkers and object formats aren't very interesting subjects, and my small programs link fast enough at present, so ...) -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | David Kleinecke <dkleinecke@gmail.com> |
|---|---|
| Date | 2015-06-25 08:10 -0700 |
| Message-ID | <f01c160d-10a8-4c8a-a9e1-f51ba633aa2b@googlegroups.com> |
| In reply to | #64123 |
On Thursday, June 25, 2015 at 6:59:59 AM UTC-7, Bart wrote: > > When I had to write the equivalent of a linker in the eighties, I > decided to just eliminate it altogether. Instead I had a 'loader', which > just took *all* the object files specified and created the executable > from those. That could be done as fast as the disk allowed, usually a > fraction of a second. That's (essentially) how the ten card loader for the IBM 704 worked. One put the ten card loader first in one's pile of cards and the routine decks after it. The loader booted itself then loaded and linked the routines then zeroed itself out (I believe two words survived) and finally jumped to the start address (I forget exactly how that was done). One had 32K of 36-bit words to work with.
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2015-07-05 01:45 -0700 |
| Message-ID | <c0961337-cb93-4198-a1e3-ffd891a1ff8b@googlegroups.com> |
| In reply to | #64094 |
bartc: > Not particularly. I certainly don't see extra merit in making something > huge, or in spreading it amongst as many files as possible. Actually > it's much harder to keep things small. This is hard decision, big files are more handy for one points less handy for another is jumping to the specyfic location in one big file faster than changing the file? (im not sure at some kinds of temporaty work one file may be faster, for some another slower (mention it if you can) large amounts of files, each at its location and name is like "Table of contents" and need to keep organisation (at some additional cost of work) it is like needed (though im not quite sure if this should be maintained at file/directory level, it could be some other concept like my mentioned concept of texts/codes/scripts book (with consistency and richer features than folder trees or sole files)
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2015-07-05 06:35 -0700 |
| Message-ID | <a8acf1d7-6d1b-4692-a085-682d0797d441@googlegroups.com> |
| In reply to | #64683 |
the problem is how exactly such book should looklike.. it should probably contain pages, pagec could be probably text files, probably also other kond of files like resources or even eecutable, but mostly focusing on the book for c ut should contain script pages, probably named (optionally unnamed?), ordered? unordered? with linera order or treelike or graph like connections? (probably physically stored linear, some book link allowing them to make more complex ordering something like hupertext links should text formating info (also info ar additionnal comments) be contained mixed with text or on some subpages? (hard to say but probably separatelly)
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-07-05 06:47 -0700 |
| Message-ID | <a7a9014e-5855-4f96-ad3e-639fc4bd77c5@googlegroups.com> |
| In reply to | #64692 |
Bart, Microsoft provides a .bat file which sets up all environment variables for you so you can run from anywhere. It's installed into the Start menu's "Visual Studio" menu by default. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-07-05 15:34 +0100 |
| Message-ID | <mnbf72$a1$1@dont-email.me> |
| In reply to | #64693 |
On 05/07/2015 14:47, Rick C. Hodgin wrote: > Bart, > > Microsoft provides a .bat file which sets up all > environment variables for you so you can run > from anywhere. It's installed into the Start > menu's "Visual Studio" menu by default. You mean VCVARS32.BAT and VCVARS64.BAT? (And which probably set the same INCLUDE and LIBPATH variables used by half of all other compilers too!) But let's try it, navigating to the BIN directory (which takes about a minute): ...>cl hello.c "hello.c(1) : fatal error C1034: stdio.h: no include path set" I now run VCVARS.BAT and try again: ...>cl hello.c "hello.c(1) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory" Looking at the INCLUDE variable, it's set to: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\SDK\include; although the actual include files of this installation are in: C:\Users\Desktop 10\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\ In fact, the "C:\Program Files (x86)\Microsoft Visual Studio 9.0\" path doesn't exist. If I set the environment variables manually, then I get: "hello.c(1) : fatal error C1083: Cannot open include file: 'stdio.h': Invalid argument" (As a general point, if an application can't find a particular file, it would be really helpful if it told you where it tried to find it! If it did find it and there was a problem with it, and might possibly be the case here, there it ought to show the full path of the file.) Anyway, MSVC only works for me if you open their special 'goldilocks' console where everything is just right. -- bartc
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2015-07-05 11:20 -0500 |
| Message-ID | <8vlipapbgn1cvs3ufr3397trs79oamfkil@4ax.com> |
| In reply to | #64694 |
On Sun, 05 Jul 2015 15:34:29 +0100, Bartc <bc@freeuk.com> wrote: >On 05/07/2015 14:47, Rick C. Hodgin wrote: >> Bart, >> >> Microsoft provides a .bat file which sets up all >> environment variables for you so you can run >> from anywhere. It's installed into the Start >> menu's "Visual Studio" menu by default. > >You mean VCVARS32.BAT and VCVARS64.BAT? (And which probably set the same >INCLUDE and LIBPATH variables used by half of all other compilers too!) > >But let's try it, navigating to the BIN directory (which takes about a >minute): > >...>cl hello.c > >"hello.c(1) : fatal error C1034: stdio.h: no include path set" > >I now run VCVARS.BAT and try again: > >...>cl hello.c > >"hello.c(1) : fatal error C1083: Cannot open include file: 'stdio.h': No >such file or directory" > >Looking at the INCLUDE variable, it's set to: > >C:\Program Files (x86)\Microsoft Visual Studio >9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio >9.0\VC\INCLUDE;C:\SDK\include; > >although the actual include files of this installation are in: > >C:\Users\Desktop 10\AppData\Local\Programs\Common\Microsoft\Visual C++ >for Python\9.0\VC\include\ > >In fact, the "C:\Program Files (x86)\Microsoft Visual Studio 9.0\" path >doesn't exist. > >If I set the environment variables manually, then I get: > >"hello.c(1) : fatal error C1083: Cannot open include file: 'stdio.h': >Invalid argument" > >(As a general point, if an application can't find a particular file, it >would be really helpful if it told you where it tried to find it! If it >did find it and there was a problem with it, and might possibly be the >case here, there it ought to show the full path of the file.) > >Anyway, MSVC only works for me if you open their special 'goldilocks' >console where everything is just right. I guess a question is how you got this installed. I know from personal experience, that MSVC will set up the correct environment batch file, even if you change its installation directory (although there's rarely a requirement to do that). But why in the world is this installed with a /Python/ in the directory? Did you just install something the like MSVC Python add-on, and not the actual MSVC? Maybe they tossed a private copy of the compiler into that for some reason? Does CPython need a C compiler for support or something? It really doesn't sound like you actually got a proper version of MSVC with C/C++ support installed.
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-07-05 17:50 +0100 |
| Message-ID | <mnbn64$u64$1@dont-email.me> |
| In reply to | #64696 |
On 05/07/2015 17:20, Robert Wessel wrote: > On Sun, 05 Jul 2015 15:34:29 +0100, Bartc <bc@freeuk.com> wrote: >> Anyway, MSVC only works for me if you open their special 'goldilocks' >> console where everything is just right. > > > I guess a question is how you got this installed. I know from > personal experience, that MSVC will set up the correct environment > batch file, even if you change its installation directory (although > there's rarely a requirement to do that). > > But why in the world is this installed with a /Python/ in the > directory? It's from here: http://www.microsoft.com/en-gb/download/details.aspx?id=44266 It just seemed an easy way of getting a Visual C compiler, without getting into the complications of Visual Studio (after ten minutes browsing I'm still no nearer to knowing exactly which package to go for, whether it even includes a compiler or is just a bunch of tools, or whether I'd be able to access the bare compiler without using the IDE which I know will be a waste of time - all MS GUI products have minds of their own.) > Does CPython need a C > compiler for support or something? CPython is a C application that compiles with gcc on Linux and apparently only with MSVC on Windows. I suspect that's how this download was created, a fairly compact one by MS standards. But it's odd that it only supports Python 2.7. Anyway it seems to compile ordinary C code too - when it works. -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | "Rick C. Hodgin" <rick.c.hodgin@gmail.com> |
|---|---|
| Date | 2015-07-05 10:29 -0700 |
| Message-ID | <bfbd63ef-385f-4ac4-a48b-5efa8bce8708@googlegroups.com> |
| In reply to | #64700 |
Bart, Never had that problem with Visual Studio. When I install, I use defaults. Everything goes to the dir indicated in the vcvars.bat file, and when I launch the batch file, command line compiles work. I've mostly done this with VS2008. Best regards, Rick C. Hodgin
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2015-07-05 12:49 -0500 |
| Message-ID | <c6ripalvbu7fnlvolcmi2bkd1rb4bo1msb@4ax.com> |
| In reply to | #64700 |
On Sun, 05 Jul 2015 17:50:32 +0100, Bartc <bc@freeuk.com> wrote: >On 05/07/2015 17:20, Robert Wessel wrote: >> On Sun, 05 Jul 2015 15:34:29 +0100, Bartc <bc@freeuk.com> wrote: > >>> Anyway, MSVC only works for me if you open their special 'goldilocks' >>> console where everything is just right. >> >> >> I guess a question is how you got this installed. I know from >> personal experience, that MSVC will set up the correct environment >> batch file, even if you change its installation directory (although >> there's rarely a requirement to do that). >> >> But why in the world is this installed with a /Python/ in the >> directory? > >It's from here: >http://www.microsoft.com/en-gb/download/details.aspx?id=44266 > >It just seemed an easy way of getting a Visual C compiler, without >getting into the complications of Visual Studio (after ten minutes >browsing I'm still no nearer to knowing exactly which package to go for, >whether it even includes a compiler or is just a bunch of tools, or >whether I'd be able to access the bare compiler without using the IDE >which I know will be a waste of time - all MS GUI products have minds of >their own.) "This package contains the compiler and set of system headers necessary for producing binary wheels for Python 2.7 packages." Why on earth would you think this is MS's C/C++ compiler for any sort of general use? https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx Download "Express 2013 for Windows Desktop". Run the batch file. Compile from the command line. For the tutorial: https://msdn.microsoft.com/en-us/library/f35ctcxw.aspx
[toc] | [prev] | [next] | [standalone]
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-07-05 19:19 +0100 |
| Message-ID | <mnbsdb$igc$1@dont-email.me> |
| In reply to | #64703 |
On 05/07/2015 18:49, Robert Wessel wrote: > On Sun, 05 Jul 2015 17:50:32 +0100, Bartc <bc@freeuk.com> wrote: > "This package contains the compiler and set of system headers > necessary for producing binary wheels for Python 2.7 packages." > > Why on earth would you think this is MS's C/C++ compiler for any sort > of general use? What does it matter? I got it to compile my 20Kloc test program, using the special command prompt it provides. That means it will probably compile any general C code. > https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx > > Download "Express 2013 for Windows Desktop". Which edition? But then along the top is a green button 1/10th the sizes of the others: "Free Visual Studio ->". Now the choice is more obvious. However, for Visual Studio Community 2013, "Setup requires up to 11 GB across all files". That is too much. Even with optional features unchecked, it's still 9GB, and the next step looked like it was about to take over my entire machine for foreseeable future. 9000MB is too much just to download a C compiler to have a go at (six thousand floppy disks to put it into perspective; I think it's possible to *write* a compiler from scratch faster than it would be to install them all!). MS seem to have forgotten what the "micro" in Microsoft used to mean. -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Martin Shobe <martin.shobe@yahoo.com> |
|---|---|
| Date | 2015-07-05 14:22 -0500 |
| Message-ID | <mnc039$vu1$1@dont-email.me> |
| In reply to | #64706 |
On 7/5/2015 1:19 PM, Bartc wrote: > On 05/07/2015 18:49, Robert Wessel wrote: >> On Sun, 05 Jul 2015 17:50:32 +0100, Bartc <bc@freeuk.com> wrote: > >> "This package contains the compiler and set of system headers >> necessary for producing binary wheels for Python 2.7 packages." >> >> Why on earth would you think this is MS's C/C++ compiler for any sort >> of general use? > > What does it matter? I got it to compile my 20Kloc test program, using > the special command prompt it provides. That means it will probably > compile any general C code. It matters because it isn't setting things up so you can use it the way you want to. There's no reason to have expected it to since it says it is setting things up for Python 2.7. >> https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx >> >> Download "Express 2013 for Windows Desktop". > Which edition? But then along the top is a green button 1/10th the sizes > of the others: "Free Visual Studio ->". Now the choice is more obvious. > However, for Visual Studio Community 2013, "Setup requires up to 11 GB > across all files". That is too much. Even with optional features > unchecked, it's still 9GB, and the next step looked like it was about to > take over my entire machine for foreseeable future. > > 9000MB is too much just to download a C compiler to have a go at (six > thousand floppy disks to put it into perspective; I think it's possible > to *write* a compiler from scratch faster than it would be to install > them all!). It's not just a C compiler. It also contains compilers for six other languages and for five of them, support for multiple-targets (even if it's just different versions of .NET). It includes a build system, an IDE, tools to upgrade projects from older versions, etc. > MS seem to have forgotten what the "micro" in Microsoft used to mean. Really? You think they're targeting their software at mainframes now? Martin Shobe
[toc] | [prev] | [next] | [standalone]
| From | Geoff <geoff@invalid.invalid> |
|---|---|
| Date | 2015-07-05 12:49 -0700 |
| Message-ID | <8g2jpal9qfn3vfgvgto52rgj1kdgihmdrs@4ax.com> |
| In reply to | #64706 |
On Sun, 05 Jul 2015 19:19:43 +0100, Bartc <bc@freeuk.com> wrote: >MS seem to have forgotten what the "micro" in Microsoft used to mean. Yes, but the marketeers determined that Gigasoft was open to too much derision and word-play. ;)
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2015-07-05 21:05 +0100 |
| Message-ID | <87bnfqwesh.fsf@bsb.me.uk> |
| In reply to | #64706 |
Bartc <bc@freeuk.com> writes: <snip> > 9000MB is too much just to download a C compiler to have a go at <snip> > MS seem to have forgotten what the "micro" in Microsoft used to mean. The micro in Microsoft probably comes from the the micro in microprocessor. To paraphrase Norma Desmond, the systems can be big, it's the processors that got small. The processors MS aims its software at are still, by and large, micro ones. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2015-07-05 15:38 -0500 |
| Message-ID | <p94jpadua31s4b5stu2sbgiue8prkfrqnc@4ax.com> |
| In reply to | #64706 |
On Sun, 05 Jul 2015 19:19:43 +0100, Bartc <bc@freeuk.com> wrote: >On 05/07/2015 18:49, Robert Wessel wrote: >> On Sun, 05 Jul 2015 17:50:32 +0100, Bartc <bc@freeuk.com> wrote: > >> "This package contains the compiler and set of system headers >> necessary for producing binary wheels for Python 2.7 packages." >> >> Why on earth would you think this is MS's C/C++ compiler for any sort >> of general use? > >What does it matter? I got it to compile my 20Kloc test program, using >the special command prompt it provides. That means it will probably >compile any general C code. OK, so you downloaded a package not intended to do what you wanted, you managed to beat on it long enough to get it to do what you want, and then you complained that it was hard to use. Seriously? >> https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx >> >> Download "Express 2013 for Windows Desktop". > >Which edition? But then along the top is a green button 1/10th the sizes >of the others: "Free Visual Studio ->". Now the choice is more obvious. The "download" button by the "Express 2013 for Windows Desktop". I'm not sure how much more plainly I could have said it. But sure, the big Express package ought to do as well. >However, for Visual Studio Community 2013, "Setup requires up to 11 GB >across all files". That is too much. Even with optional features >unchecked, it's still 9GB, and the next step looked like it was about to >take over my entire machine for foreseeable future. > >9000MB is too much just to download a C compiler to have a go at (six >thousand floppy disks to put it into perspective; I think it's possible >to *write* a compiler from scratch faster than it would be to install >them all!). > >MS seem to have forgotten what the "micro" in Microsoft used to mean. Honestly, if that's a problem for you, don't do it. The rest of us might be bemused by the total size of the package, but really don't care in the least. BTW, the Express/Desktop edition is about half that size, not that it matters. And if we're going to make amusing but pointless comparisons, that would be some 14,000 miles of paper tape or 112 million punch cards. And if you drop those, you're *really* going to be annoyed!
[toc] | [prev] | [next] | [standalone]
Page 4 of 7 — ← Prev page 1 2 3 [4] 5 6 7 Next page →
Back to top | Article view | comp.lang.c
csiph-web