Accessing external library from C project [message #734264] |
Fri, 07 October 2011 06:27  |
Eclipse User |
|
|
|
Hi,
I have an external library of "*.a" format. I want to include it in the compiling of my C project in eclipse. I have look over the official wiki page but it does not help me. I seems that the library is included as it does not give an errors regarding it location as it did before. But now it is throwing a number of errors which I do not understand,
make: *** [src/TestC.o] Error 1 TestC line 0 C/C++ Problem
expected identifier or '(' before '!' token TestC line 1, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '`' in program TestC line 2, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '`' in program TestC line 3, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\1' in program TestC line 3, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
invalid suffix "ubuntu5" on integer constant TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
missing terminating ' character TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\1' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\10' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\177' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\2' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\20' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\203' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\211' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\213' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\215' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\3' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\303' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\304' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\311' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\33' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\345' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\354' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\374' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\4' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
stray '\6' in program TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
too many decimal points in number TestC line 4, external location: /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
Can anyone tell me what I am doing wrong?
P.S. I have checked all my files and the compile fine through the terminal and the program runs as it should.
Any help in this matter will be appreciated.
|
|
|
|
Re: Accessing external library from C project [message #734588 is a reply to message #734264] |
Sat, 08 October 2011 15:04  |
Eclipse User |
|
|
|
> Hi,
>
> I have an external library of "*.a" format. I want to include it in the
> compiling of my C project in eclipse. I have look over the official wiki page
> but it does not help me. I seems that the library is included as it does not
> give an errors regarding it location as it did before. But now it is throwing a
> number of errors which I do not understand,
>
>
>> /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
> stray '\4' in program TestC line 4, external location:
> /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
> stray '\6' in program TestC line 4, external location:
> /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
> too many decimal points in number TestC line 4, external location:
> /home/shahbaz/Documents/Test/TestF.a C/C++ Problem
>
> Can anyone tell me what I am doing wrong? 8o
> P.S. I have checked all my files and the compile fine through the terminal and
> the program runs as it should.
>
> Any help in this matter will be appreciated.
>
My suggestion is to first install the Photran plugin for Fortran capability.
Then you can create a library file project to generate either an archive, ".a"
or shared object, ".so" file. Afterward, just include it in your CDT project as
you would any other library.
|
|
|
Powered by
FUDForum. Page generated in 0.02725 seconds