*** Warning: linker path does not have real file for library -lssl. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libssl and none of the candidates passed a file format test *** using a file magic. Last file checked: /ssl/lib/libssl.a *** Warning: linker path does not have real file for library -lcrypto. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libcrypto and none of the candidates passed a file format test *** using a file magic. Last file checked: /ssl/lib/libcrypto.a *** Warning: linker path does not have real file for library -lz. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libz and none of the candidates passed a file format test *** using a file magic. Last file checked: /mingw/lib//libz.a *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. *** Since this library must not contain undefined symbols, *** because either the platform does not support them or *** it was explicitly requested with -no-undefined, *** libtool will only create a static version of it.
4 Réponses :
libtool a construit uniquement une libcurl statique et non une bibliothèque dynamique. Vos en-têtes recherchent une libcurl dynamique. Ce n'est probablement pas la faute de libcurl, car je peux voir le code dans les en-têtes prenant en charge Détails techniques: Voir cette réponse concernant la libsssh . p>
solution: compiler avec __ declSpec (dllimport) code> et
__ declSpec (dllexport) code> (c'est un bon signe que l'auteur de package sait ce que . P>
-DCurl_staticlib code>. p>
Hm. Je pensais que libcurl construit à la fois statique et dynamique. J'ai essayé -dcurl_staticlib, mais maintenant, je reçois des centaines d'erreurs de liaison disent une référence non définie à Wsastartup @ 8, _IMP__Arees_library_init, NTOHS @ 4, Getockopt @ 20 etc.
Vous ne reliez dans aucune des bibliothèques dépendantes. Vous aurez besoin (au moins) -LWINSOCK2` plus quels que soient les drapeaux -l code> pour les autres bibliothèques (il ressemble à OpenSSL et éventuellement un ou deux autres).
J'ai pu éviter ces erreurs de liaison de boucle sur Windows (Mingw Win32) en ajoutant l'option My Build a deux fichiers libcurl dans dossier Mingw / Lib: -LCurl.dll code>.
-dcurl_staticlib code> n'était pas nécessaire dans mon cas. P>
libcurl.a et libcurl.dll.a code> p>
Merci pour le BridgeMumbe qui résout mon problème G ++: Code :: Blocs> Paramètres> Compilateur> Paramètres de liaison> Ajouter> libcurldll.a && libcurlll.a
Avoir le même problème à l'aide de Netbeans 7.1 avec Mingw. Des propriétés, Linker Ajouter une bibliothèque libcurl.dll.a a résolu le problème pour moi. p>
Ce fichier était situé sous CURL-7.28.1 \ Lib.Libs après avoir couru le MINGW. p>
J'ai eu une erreur similaire (avec libz et libsqlite) dans différents projets. Il est produit par script GNU libtool. P>
La raison dans mon cas n'était pas du manque de fichiers pour ces bibliothèques (.la?) ou peut-être des variantes libz.dll.a des bibliothèques. P>
Pour avoir tous les fichiers nécessaires à la construction de Automake / AutoConf Une autre et l'option la plus simple consiste à construire une boucle dynamique avec cmake ( https://github.com/ BASTER / CURL.GIT ) P> ./ configure --prefix = ...;; faire code>, vous devrez créer
zlib code>,
crypto code> et
ssl code> avec
configure code> et
Faites code> sous le même message.
CULAKE ou CUSTURE MAKEFILE Builds ne fonctionnera généralement pas comme des dépendances de Bibliothèque partagée. P>