eclipse can't find installed library [message #1727415] |
Tue, 22 March 2016 17:09  |
Eclipse User |
|
|
|
Hello all,
I have eclipse mars installed on my ubuntu 14.04 lts machine. I am using cdt with c++ to cross compile an application for the raspberry pi. I have a library I want to use called pigpio.
I have successfully installed the library files in /usr/local/include. The only problem is that I can't get eclipse to link files in that path.
I am not entirely sure what I am doing wrong. The library I want to use is pigpio.h. In the project properties I have tried to add the directory path too Properties -> Settings -> G++ Cross Compiler -> Includes. This doesn't seem to work. What am I doing wrong? Thanks!!
|
|
|
|
Re: eclipse can't find installed library [message #1728372 is a reply to message #1727478] |
Sun, 03 April 2016 19:34   |
Eclipse User |
|
|
|
Thanks for the explanation. I have an issue much like the one from OP, so I thought it would be relevant to put it here. The details of my issue are as follows:
I'm trying to cross compile code to the Beaglebone Black that references libraries from the Starterware package offered by TI for the AM335X processor on the BBB (software-dl.ti.com/dsps/dsps_public_sw/am_bu/starterware/latest/index_FDS.html)
Now, in the includes folder of these files, I can reference files that allow me to access the gpio or use interrupts and various other functions. I've included the header files, but am not able to properly reference the library files.
In eclipse, in the top pane of the Libraries tab, I've put: " drivers", " platform", " system", " utils" (with the spaces in front, but I've also tried omitting the spaces and it still doesn't work).
In the bottom pane, I've put the paths to the .lib files. So for example, for drivers, this would be ".../AM335X_StarterWare_02_00_01_01/binary/armv7a/cht_ccs/am335x/drivers". The "drivers.lib" file is inside the "Release" folder inside the said path.
FYI, I've also tried making the path be ".../AM335X_StarterWare_02_00_01_01/binary/armv7a/cht_ccs/am335x/drivers/Release" as well, and still have issues.
The error I get is:
"/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -l drivers"
and the same thing for all of the other libraries (platform, system, utils).
So my question is, clearly I'm doing something incorrect, so where is my error? Is the .lib file that I described what I'm actually supposed to have eclipse reference when compiling? If not, given that I have all these library functions provided by TI, how should I go about using them? I've read on other posts that the library file often has a prefix lib, which none of these files do. Can someone please give me some pointers?
Thanks!
|
|
|
|
|
|
|
|
Re: eclipse can't find installed library [message #1781880 is a reply to message #1728634] |
Wed, 14 February 2018 04:27  |
Eclipse User |
|
|
|
it shows Eclipse in C language Program can't find the opencv include files to build the new project
No, it doesn't.
> In fact Eclipse is using a MingW path I don't recall setting.
The "path" you are showing is the path to the linker. You can tell this by noting the "ld.exe" at the end of it. The message is that the linker cannot find the libraries you are specifying. Ensure that they exist in the directory you've told it to look in.
The linker is called after all of the code in your project has been compiled (therefore, it found all of the include/header files necessary for compilation.)
http://www.cetpainfotech.com/technology/c-language-training
|
|
|
Powered by
FUDForum. Page generated in 0.12304 seconds