[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Problemer med lænkning



On 11/30/2012 04:39 PM, Michael Rasmussen wrote:
> Indeholder din fil hash.c in reference til headerfilen for openssl?
>
> #include <ssl.h>
Nej, det er ikke nødvendigt, for alle funktioner, jeg bruger, er
defineret i openssl/sha.h
Compileringen går fint, det er kun lænkningen, som går galt:

$ cc `pkg-config  --cflags libssl` -c -o hash.o hash.c
$ ls *.o
hash.o
$

On 11/30/2012 05:04 PM, Jan Holst Jensen wrote:
> Hvis du vil bruge .so filen lyder det til at du vil linke dynamisk.
> Plejer man så ikke at skulle have "-ldl" med i cc kommandoen - og
> måske også "-rdynamic" ? Eller mangler du at installere -dev pakken ?
> Hos mig er "libcrypto.a" i "libssl-dev" pakken. Mvh -- Jan 
'dl' er til hvis jeg havde brugt 'dlopen()' og 'dlsym()' funktionerne.
De bruges, hvis man vil indlæse et library på runtime (ikke på load
time), men det er ikke det, jeg vil.

Jeg har dev pakken, for den leverer header filerne, og uden dem ville
jeg få compiler fejl.

libcrypto.a er et archive, som indeholder objekt filer, som man kan
lænke statisk ind i sit program, uden at man skal bruge statisk lænkning
generelt, og det er heller ikke det, jeg vil. Jeg vil bare lænke
dynamisk, og det forstår jeg bare ikke, at jeg får problemer med, for
som sagt ligger .so filen der, den bliver fundet af lænkeren og den
indeholder de funktioner, som lænkeren siger, at den ikke kan finde.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2012-12-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *