* .a files
@ 2008-08-25 10:20 Harris Mark Hatzopoulos
2008-08-25 11:41 ` Sisyphus
2008-08-25 19:18 ` Kai Ruottu
0 siblings, 2 replies; 3+ messages in thread
From: Harris Mark Hatzopoulos @ 2008-08-25 10:20 UTC (permalink / raw)
To: gcc-help
Hi,
I have a library file libefsl.a that is supposed to include a header file
efs.h that I require.
I am writing a program for a microcontroller in AVR-Studio or WINAVR have
included the header file as follows:
#include <efs.h>
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.
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??
Regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: .a files
2008-08-25 10:20 .a files Harris Mark Hatzopoulos
@ 2008-08-25 11:41 ` Sisyphus
2008-08-25 19:18 ` Kai Ruottu
1 sibling, 0 replies; 3+ messages in thread
From: Sisyphus @ 2008-08-25 11:41 UTC (permalink / raw)
To: Harris Mark Hatzopoulos, gcc-help
----- Original Message -----
From: "Harris Mark Hatzopoulos" <h.hatzopoulos@ugrad.unimelb.edu.au>
.
.
>
> 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.
>
You also need to specify the location of efs.h .
eg, in the command line, specify -I/home/me/headers (assuming efs.h is in
/home/me/headers).
Cheers,
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: .a files
2008-08-25 10:20 .a files Harris Mark Hatzopoulos
2008-08-25 11:41 ` Sisyphus
@ 2008-08-25 19:18 ` Kai Ruottu
1 sibling, 0 replies; 3+ messages in thread
From: Kai Ruottu @ 2008-08-25 19:18 UTC (permalink / raw)
To: Harris Mark Hatzopoulos; +Cc: gcc-help
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 ----------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-25 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-25 10:20 .a files Harris Mark Hatzopoulos
2008-08-25 11:41 ` Sisyphus
2008-08-25 19:18 ` Kai Ruottu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).