Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

C Lib file

Status
Not open for further replies.

electroRF

Member
Hi,

I have a question please regarding the C Lib (.lib) file.

I have an Executable image (.bin file), which I burn it into an embedded target processor (I have a development board).

I do not burn any library which are related to the image, into the processor.

However, there are libraries which exist in the Source Project, which might be used during the Compilation / Linkage time (I'm trying to figure it out).

What is the usage of these Libraries, if they are not used by the target processor?

What do they contain?

(Note, these are not DLLs, but .lib files)

Thank you very much.
 
Not quite sure what you mean!!

C compilers compile the code into object code.... The linkers only extract the functions from the libraries that are actually used... If a library contains 20 functions but you only use one, then the linker will only link in the function that you need.... Only used functions and variables make to the the final hex / exe file
 
Try compiling without the libraries, if it still compiles then you're not using them, if not, you are.

Mike.
 
Status
Not open for further replies.

Latest threads

Back
Top