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


Groups > comp.programming > #8578 > unrolled thread

U-boot Standalone Examples - Hello_world.c

Started byIlias Abrams <iliasabrams@gmail.com>
First post2018-03-28 11:23 -0700
Last post2018-03-29 16:34 +0200
Articles 2 — 2 participants

Back to article view | Back to comp.programming


Contents

  U-boot Standalone Examples - Hello_world.c Ilias Abrams <iliasabrams@gmail.com> - 2018-03-28 11:23 -0700
    Re: U-boot Standalone Examples - Hello_world.c Wouter Verhelst <w@uter.be> - 2018-03-29 16:34 +0200

#8578 — U-boot Standalone Examples - Hello_world.c

FromIlias Abrams <iliasabrams@gmail.com>
Date2018-03-28 11:23 -0700
SubjectU-boot Standalone Examples - Hello_world.c
Message-ID<32138b9e-84f1-46c8-876a-d1884e30b8a0@googlegroups.com>
Hi guys, 

I was looking into the standalone example (hello_world) 
that U-boot repository contains and builds when you build and compile U-boot. 

It has those two libraries at the top, and I was wondering, 
where the program finds those libraries? Where those headers located? 
There are not into the U-boot directory. 
A Makefile defines where the compiler will find the header? 
I am a newbie in C programming so, I am trying with simple examples to 
understand how the compiler works and combine the headers with .c program. 

#include <common.h> 
#include <exports.h> 

Thanks! 

[toc] | [next] | [standalone]


#8589

FromWouter Verhelst <w@uter.be>
Date2018-03-29 16:34 +0200
Message-ID<h5avoe-ae7.ln1@gangtai.grep.be>
In reply to#8578
On 28-03-18 20:23, Ilias Abrams wrote:
> Hi guys, 
> 
> I was looking into the standalone example (hello_world) 
> that U-boot repository contains and builds when you build and compile U-boot. 
> 
> It has those two libraries at the top, and I was wondering, 
> where the program finds those libraries? Where those headers located? 

For clarity, "header files" and "libraries" are not the same thing. A
header file is meant to contain function declarations, constants, and
macros that a programmer may be able to use in a program. A library is a
body of compiled code that a program may link to.

> There are not into the U-boot directory. 
> A Makefile defines where the compiler will find the header? 

Usually, the build system (which may, but is not required to be, a
Makefile) will indeed have to define where such headers are to be found.

Most compilers accept a "-I" argument to pass extra include paths to the
preprocessor; if you search the Makefile for such options, you should be
able to figure out where the header files in question are to be found.

Regards,

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web