|
|
|
Re: Trouble with libraries [message #1733501 is a reply to message #1733492] |
Sat, 28 May 2016 21:43 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
You left out the text following the command in the log. It contains the actual error messages.
You haven't shown the log after you made the changed to using the full path.
It's important to know how the linker's complaints are worded.
Since you are using Windows are you running with MinGW or cygwin?
This is from MinGW: http://www.mingw.org/wiki/specify_the_libraries_for_the_linker_to_use
EDIT:
Quote: gcc "-LC:\\Users\\Falamana\\Desktop\\Eclipse\\ADC_project" -o ADC_project.exe ADC_source.o -lpicohrdl
:
:
i have done exactly as you said with the path and name and all (i think it shows at the comand above)
I said you need to put the full path and name on the command line. It isn't clear if you have done so.
GCC is trying to find libpicohrdl.a based on the rules for -L and -l.
Your file name doesn't follow the convention expected.
The command should be:
gcc -o ADC_project.exe ADC_source.o "C:\\Users\\Falamana\\Desktop\\Eclipse\\ADC_project\\picohrdl.lib"
You do this by putting the full path and name in the linker --> Miscellaneous dialog as an additional object file.
[Updated on: Sun, 29 May 2016 13:03] Report message to a moderator
|
|
|
|
Re: Trouble with libraries [message #1733614 is a reply to message #1733561] |
Mon, 30 May 2016 12:36 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Well, I don't know. I haven't used Windows in some time and can't currently look into the problem.
The names look like DLL references which require an import library.
I would have thought the .lib file was it.
It may be a static library instead.
Unfortunately, both have .lib in the name but are not the same.
One contains the code and the other pointers to the code.
If you have a way to list the symbols in the .lib file it may provide a clue.
The same with your object files.
There are a number of binary tools provided for doing this in a package called GNU Binutils. They were linked from a question about MinGW so there are probably Windows versions available. You may already have them.
https://sourceware.org/binutils/docs/binutils/index.html
The code may have been compiled with import decorations. Something like __declspec(dllimport) which outputs references formatted for using an import library. They look a lot like what your symbols do. Try removing any decorations.
This is wandering off topic for this forum as it is not an Eclipse/CDT issue but a problem with using GCC. Eclipse just provided a way to build and run make. The rest is up to you.
I would think the pico people could explain what they expected you to do.
For further reading about DLLs using MinGW read the following:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/win32.html
http://stackoverflow.com/a/6480464/3312726
EDIT:
The Red Hat link has a section named "direct linking to a dll".
You might want to read it.
Maybe all you need to do is use the DLL instead of the LIB file.
[Updated on: Mon, 30 May 2016 13:45] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03032 seconds