Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Accessing external library from C project
Accessing external library from C project [message #734264] Fri, 07 October 2011 10:27 Go to next message
shaz  is currently offline shaz Friend
Messages: 10
Registered: September 2011
Junior Member
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? Shocked

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 #734268 is a reply to message #734264] Fri, 07 October 2011 10:37 Go to previous messageGo to next message
shaz  is currently offline shaz Friend
Messages: 10
Registered: September 2011
Junior Member
One more addition information. I made this library by compiling fortran code into a .o object (which works perfectly if I run in terminal). And then fed it to archive creator to churn out the .a format.
Re: Accessing external library from C project [message #734588 is a reply to message #734264] Sat, 08 October 2011 19:04 Go to previous message
Doyle Rhynard is currently offline Doyle RhynardFriend
Messages: 5
Registered: July 2009
Junior Member
> 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.
Previous Topic:Where to find "Change Variable Value" option
Next Topic:Pure Virtual functions in CDT
Goto Forum:
  


Current Time: Fri Apr 19 21:01:19 GMT 2024

Powered by FUDForum. Page generated in 0.02331 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top