|
|
Re: eclipse can't find installed library [message #1728372 is a reply to message #1727478] |
Sun, 03 April 2016 23:34 |
David Liu Messages: 4 Registered: April 2016 |
Junior Member |
|
|
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 #1728623 is a reply to message #1728620] |
Wed, 06 April 2016 01:42 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Quote:The "drivers.lib" file is inside the "Release" folder
This is not a standard name. The library paths will appear as -L<path> in the link command. The library names will appear as -l<name>. The -l<name> causes the linker to search for a file named lib<name>.so if it's a dynamic library or lib<name>.a if static (https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options). Both of these have a specific file format. If the file is one of these but just has the wrong name, you could try having it placed in the linker command as an input file by using the Other Objects pane under Miscellaneous linker settings menu. You could try it even if it's not in standard file format. Some modified versions of GCC understand things like a DLL.
I have no idea what library files you should be using. Are you really sure the libraries are contained in the directory you've given? Yes, if it starts with '/' it is a Linux absolute path. However, ".../AM335X_StarterWare_02_00_01_01/binary/armv7a/cht_ccs/am335x/drivers" which you gave earlier is not. If you are taking shortcuts to save typing here, please don't.
You could post the actual link command from the build log along with following output . There may be something obviously wrong with the command. You could also try running the linker command in a command terminal until you figure out what is really needed. Then you'll have a better handle on what needs to be given to Eclipse.
[Updated on: Wed, 06 April 2016 01:43] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03720 seconds