Re: .a files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Harris Mark Hatzopoulos wrote:

I have a library file libefsl.a that is supposed to include a header file
efs.h that I require.

Why you think so? Those '.a' library archives usually have only
precompiled objects, the compiled code for the functions in the
library...

I am writing a program for a microcontroller in AVR-Studio or WINAVR have
included the header file as follows:

#include <efs.h>

This is ok, the header is expected to be in the built-in search
paths of the C preprocessor ('cpp'). If not, one tells with the
'-I<directory>' option where it is...

However when I compile I am told efs.h no such file...

I have included the directory of the libefsl.a file in the compiler but
cannot get my program to compile.

With the '-L<directory>' option on the "compile" or "link" line?

I am wondering if I am following the correct procedure? Or else how are
you meant to include header files that live in a lib.a file??

As was told, header files aren't in inside (binary) library files,
they are separate text files somewhere else. The "standard headers"
normally are in '$prefix/$target/include' and the standard libraries
in '$prefix/$target/lib' in a crosscompiler like one for AVR...

Please learn to use Google or something search machine in the net!
A simple search with words "WINAVR efs.h" resulted to the EFSL-
manual :

http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/e/ef/efsl/efsl-manual.pdf

and it seemed that this manual teaches all the necessary things like
how to use the necessary '-I' and '-L' options :

---------------- clip ----------------------------
1. Compile the program (gcc -I/home/user/efsl/inc/ -I/home/user/efsl/conf
-o linuxtest linuxtest.c -L./ -lefsl).
---------------- clip ----------------------------

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux