473,738 Members | 7,110 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

first C source file to be compiled

Hello,

I have a simple question I would like to ask to you guys... It boils
down to a simple observation about all the C libraries existing out
there: there must be a C source file that must be compiled first, I mean
before all the others.

That's why I poke my nose in a C library (GNU glibc for instance) to
find out this mysterious file... This is indeed the library programmers
(including me) often refer to.

But I'm not good enough to extract from autotools-related files (in the
glibc tarball) which C file is compiled first. Or perhaps I made a
mistake in my way of thinking and this file is actually located elsewhere...

Can you help me in this tremendous quest for truth finding this C source
file ?

Thanks in advance for your help.

Marc Jeambrun
Dec 1 '06 #1
6 1635
Marc Jeambrun wrote:
Hello,

I have a simple question I would like to ask to you guys... It boils
down to a simple observation about all the C libraries existing out
there: there must be a C source file that must be compiled first, I mean
before all the others.

That's why I poke my nose in a C library (GNU glibc for instance) to
find out this mysterious file... This is indeed the library programmers
(including me) often refer to.

But I'm not good enough to extract from autotools-related files (in the
glibc tarball) which C file is compiled first. Or perhaps I made a
mistake in my way of thinking and this file is actually located elsewhere...

Can you help me in this tremendous quest for truth finding this C source
file ?
There need be nothing special about the module to be compiled first. It
depends on the command lines generated by makefiles and for projects
like glibc(), can be quite involved, and may vary from machine to
machine, OS to OS, compiler to compiler.

It's also a detail of implementation and instance and hence off-topic
here.

Dec 1 '06 #2
Marc Jeambrun wrote:
I have a simple question I would like to ask to you guys... It boils
down to a simple observation about all the C libraries existing out
there: there must be a C source file that must be compiled first, I mean
before all the others.
Even assuming that there must be a compiled-first file, what are you
thinking of doing with it when you've got it?

[It would, I think, be more than 30 years old ... if it exists at all.]

--
Chris "subtle, like a barrel" Dollin
"Never ask that question!" Ambassador Kosh, /Babylon 5/

Dec 1 '06 #3
Marc Jeambrun said:
Hello,

I have a simple question I would like to ask to you guys... It boils
down to a simple observation about all the C libraries existing out
there: there must be a C source file that must be compiled first, I mean
before all the others.
Ponder no more!

You are right - there *is* such a file. But there's no mystery about it. It
is often published in books on the C language. For example, you can find it
on page 1000 of K&R2, a trivial variant on page 100001 of "C: How to
Program", 5th edition, by Deitel and Deitel, and 1001 of "C: A Reference
Manual", 4th edition, by Harbison and Steele. I've written the page numbers
given in binary because I know how much students like to feel involved in
the learning process.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 1 '06 #4
Marc Jeambrun wrote:
Hello,

I have a simple question I would like to ask to you guys... It boils
down to a simple observation about all the C libraries existing out
there: there must be a C source file that must be compiled first, I mean
before all the others.

That's why I poke my nose in a C library (GNU glibc for instance) to
find out this mysterious file... This is indeed the library programmers
(including me) often refer to.

But I'm not good enough to extract from autotools-related files (in the
glibc tarball) which C file is compiled first. Or perhaps I made a
mistake in my way of thinking and this file is actually located
elsewhere...

Can you help me in this tremendous quest for truth finding this C source
file ?

Thanks in advance for your help.

Marc Jeambrun
There is a file that in many systems must be linked first.
You are confusing (maybe) compiling and linking...

That file is called "the startup file" or simply
the stratup. It is normally written in assembler but it can
be written in C too.

Is this the file you are referring to?
Dec 1 '06 #5
Richard Heathfield wrote:
Marc Jeambrun said:
>Hello,

I have a simple question I would like to ask to you guys... It boils
down to a simple observation about all the C libraries existing out
there: there must be a C source file that must be compiled first, I mean
before all the others.

Ponder no more!

You are right - there *is* such a file. But there's no mystery about it.
It is often published in books on the C language. For example, you can
find it on page 1000 of K&R2, a trivial variant on page 100001 of "C: How
to Program", 5th edition, by Deitel and Deitel, and 1001 of "C: A
Reference Manual", 4th edition, by Harbison and Steele. I've written the
Richard, this is a serious error, it was
the 7th edition of Harsteel and Humbug from 1977.
page numbers given in binary because I know how much students like to feel
involved in the learning process.
--
"Careful with that VAX, Eugene!"
Dec 1 '06 #6
"Marc Jeambrun" <mj*******@gmai l.comwrote in message
news:45******** *************@n ews.free.fr...
I have a simple question I would like to ask to you guys... It boils
down to a simple observation about all the C libraries existing out
there: there must be a C source file that must be compiled first, I
mean before all the others.
There is no requirement that any particular file must be compiled first.
In every large project I've seen, the source files are compiled in
seemingly-random order.

Linking, which is OT here, may require that some files be linked before
others, but that typically happens after _all_ the files are compiled,
so compilation order is again irrelevant.

S

--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
--
Posted via a free Usenet account from http://www.teranews.com

Dec 1 '06 #7

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

Similar topics

188
8491
by: Ilias Lazaridis | last post by:
I'm a newcomer to python: - E01: The Java Failure - May Python Helps? http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553 - I've download (as suggested) the python 2.4 installer for windows. Now I have problems to compile python extension that some packages
2
2326
by: Brad Quinn | last post by:
It appears that IIS hangs the first time two requests are made for same page in quick succession. Although it may very well be something else I'm doing wrong. I have a page (ViewDocument.aspx) that dynamically generates one or more image tags. The source attribute of the image tag is another page (ViewImage.aspx) that simply writes the image data to the response. When I load ViewDocument.aspx for the first time, everything is fine as...
0
2265
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or updating the code-behind dll) accessing any aspx page in the application causes the application to run for the first time. Some of the initialization involves reading and writing some text and xml files using simple streamreader and streamwriter...
66
7465
by: Jon Skeet [C# MVP] | last post by:
I'm sure the net will be buzzing with this news fairly soon, but just in case anyone hasn't seen it yet: Microsoft are going to make the source code for the .NET framework (parts of it, including the BCL, ASP.NET and LINQ) available both for viewing and debugging into. I won't go into all the details here, as they're covered on Scott Guthrie's blog:
2
1835
by: DDD | last post by:
I have a web site project using C#. If I release the web site in the VS2005, all works well except that DLL file name has some strange, name APP_Code_erwer234.dll. And erwer234 is a random string. Every time after released, it will become APP_Code_dfdfgr3334.dll, In this condition, the web site running needs aspx file and dll file. APP_Code_asdfasd434.dll, etc. Because of this, I have to use CSC to compile myself with my special name....
10
2204
by: Tomás Ó hÉilidhe | last post by:
I'd post this on a gcc newsgroup but I'd be more productive talking to the wall. Anyway, let's say someone throws some source code at you for a particular program and says, "Just compile it, it works fine". Now admittedly, I tend to have a phobia of this situation because I recall from my Windows days the numerous times I was given code that was supposedly "good to go", but which failed to compile for some stupid reason. Of course I...
13
2254
by: sachin | last post by:
Hi, Is it possible to do something like this: unsigned char arr = { #include "cFile.c" } I need that C source file cFile.c to compile and its binary output to include in array.
8
1304
by: Max | last post by:
Is it possible for an ASP.net server (like IIS 6) to run web application without having available the code behind forms in clear ascii? Can I provide a compiled product to the customer, not an exe file of course, but some dll compiled by my server ? I'm asking that because 1. sometimes I am not happy to provide my source code 2.customer is afraid of their internal security... Thanks Max
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9335
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9263
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.