|
|
|
|
|
Re: Adding C static library to my project [message #1769876 is a reply to message #1769845] |
Fri, 04 August 2017 12:01 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
The first error is saying there is no definition for SSL3_RANDOM_SIZE.
The second and third are saying that what ssl is pointing toward is declared only as a forward declaration such as "struct ssl_;" .
I would think that the build had stopped before reaching the link stage so your questions about linking the library appear premature.
You should fix the depicted problems first.
Your post suggests a misunderstanding of what is going on.
The -L,-l are options telling the linker where to find the compiled functions which have been collected into an archive.
The compiler is interested only in the interface to those functions.
These are usually specified in an included header (.h) file.
[Updated on: Fri, 04 August 2017 12:20] Report message to a moderator
|
|
|
|
|
|
Re: Adding C static library to my project [message #1828000 is a reply to message #1827992] |
Thu, 28 May 2020 21:30 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Your question is really broad.
It's the logical equivalent of purchasing a machine shop with lots of tools
then asking how to build an automobile with it.
If you don't already know how, you likely wouldn't understand the answers.
The short answer is: it's complicated.
A somewhat longer answer is:
- You write your code
- Tell the compiler where to find the library interface descriptions (header files)
- Tell the linker how to generate an executable (libraries to use and where to find them)
- Convert the executable into one you can use on your target machine
You really need to know how to do that without using Eclipse.
Afterwards, it will become rather obvious how to set the options when using Eclipse.
Eclipse uses Make (or some functional equivalent) to perform builds.
A Makefile usually breaks the build task into (1) compiling modules then (2) linking them.
If Eclipse is not generating the Makefile then you don't tell it anything -- your Makefile does it all.
My suggestion is learn how to compile and link executables from the many tutorials available on the Internet.
Once you understand how to do that and you still don't understand how to tell Eclipse
then post a new question with specifics on what you've tried and what you expected.
[Updated on: Fri, 29 May 2020 07:57] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04677 seconds