Re: Successfully build after 2 week struggle but...!
Ok, Thanks i 'll try what youh have said. On Sat 26 Jan, 2019, 9:51 AM Gisle Vanem via curl-library < curl-library@cool.haxx.se wrote: > Himanshu Rastogi wrote: > > > My configuration: > > *Included Library:* /libssl, libssh2, zlibwapi, libcrypo, nghttp2, > Ws2_32, Wldap32, Normaliz, winmm./ > > /*CFLAGS : /*MT/ > > *Preprocessor macro: *CURL_STATICLIB > > *Compiler: VC15* > > *BUT!* > > After all these configuration it still show error messages like: > > *BUILD OUTPUT:* > > K4049: locally defined symbol __open imported > > libcurl.lib(mime.obj) : error LNK2019: unresolved external symbol > __imp__access referenced in function _curl_mime_filedata > > I suspect you have compiled files with both: >cl -MT ... (for your code) > and: >cl -MD ... (for libcurl code) > > Try linking with 'link -verbose ...', redirect the output > and look for what CRT libraries pulls in. > > > crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol > __imp__CertOpenStore@20 referenced in function > > _capi_open_store > > You need to ensure 'link ... crypt32.lib' is used. > > > -- > --gv > --- > Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library > Etiquette: https://curl.haxx.se/mail/etiquette.html --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Re: Successfully build after 2 week struggle but...!
Himanshu Rastogi wrote: My configuration: *Included Library:* /libssl, libssh2, zlibwapi, libcrypo, nghttp2, Ws2_32, Wldap32, Normaliz, winmm./ /*CFLAGS : /*MT/ *Preprocessor macro: *CURL_STATICLIB *Compiler: VC15* *BUT!* After all these configuration it still show error messages like: *BUILD OUTPUT:* K4049: locally defined symbol __open imported libcurl.lib(mime.obj) : error LNK2019: unresolved external symbol __imp__access referenced in function _curl_mime_filedata I suspect you have compiled files with both: cl -MT ... (for your code) and: cl -MD ... (for libcurl code) Try linking with 'link -verbose ...', redirect the output and look for what CRT libraries pulls in. crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertOpenStore@20 referenced in function _capi_open_store You need to ensure 'link ... crypt32.lib' is used. -- --gv --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
RE: Successfully build after 2 week struggle but...!
Hi Himanshu, “I successfully build windows x86 static libcurl library after struggling for two week. I'm new to building libraries but at the end it build. I build all dependencies statically like…” When you create a static library, you don’t have to worry about satisfying link dependencies your code has (functions defined in external modules). Your code still has these dependencies, but they aren’t a problem until you try to link your static library into a program (.exe) or .dll / .so (in Linux). So at the time you link your program (not libcurl but your program which depends on libcurl – looks like you called it CurlLib2UploadFile.exe), you need to specify all the libraries which satisfy these missing dependencies to the linker. These missing dependencies (read, write, CertOpenStore, etc.) look like methods defined in standard windows libraries (ws2_32.lib, Crypt32.lib, etc.) Hope this helps. -Mark --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Successfully build after 2 week struggle but...!
Hi, This is Himanshu from somewhere. I successfully build *windows x86 static libcurl library* after struggling for two week. I'm new to building libraries but at the end it build. I build all dependencies statically like: *zlib > openssl > openssh > nghttp2 > libcurl.* But when i try to link it to my simple example in qt-creator it is showing some error messages. My configuration: *Included Library:* *libssl, libssh2, zlibwapi, libcrypo, nghttp2, Ws2_32, Wldap32, Normaliz, winmm.* *CFLAGS : /MT* *Preprocessor macro: *CURL_STATICLIB *Compiler: VC15* *BUT!* After all these configuration it still show error messages like: *BUILD OUTPUT:* K4049: locally defined symbol __open imported libcurl.lib(mime.obj) : error LNK2019: unresolved external symbol __imp__access referenced in function _curl_mime_filedata OLDNAMES.lib(access.obi) : error LNK2001: unresolved external symbol __imp__access libcurl.lib(warnless.obj) : error LNK2019: unresolved external symbol __imp__read referenced in function _curlx_read OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol __imp__read libcurl.lib(warnless.obj) : error LNK2019: unresolved external symbol __imp__write referenced in function _curlx_write OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol __imp__write libcurl.lib(file.obj) : error LNK2019: unresolved external symbol __imp__close referenced in function _file_done OLDNAMES.lib(close.obi) : error LNK2001: unresolved external symbol __imp__close libcurl.lib(file.obj) : error LNK2019: unresolved external symbol __imp__open referenced in function _file_connect OLDNAMES.lib(open.obi) : error LNK2001: unresolved external symbol __imp__open libcurl.lib(smb.obj) : error LNK2019: unresolved external symbol __imp___getpid referenced in function _smb_format_message libcurl.lib(system_win32.obj) : error LNK2019: unresolved external symbol __imp___mbspbrk referenced in function _Curl_load_library crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertOpenStore@20 referenced in function _capi_open_store crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertCloseStore@8 referenced in function _capi_find_key crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertEnumCertificatesInStore@8 referenced in function _capi_find_cert crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertFindCertificateInStore@24 referenced in function _capi_find_cert crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertDuplicateCertificateContext@4 referenced in function _capi_load_ssl_client_cert crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertFreeCertificateContext@4 referenced in function _capi_dsa_free crypto.lib(e_capi.obj) : error LNK2019: unresolved external symbol __imp__CertGetCertificateContextProperty@16 referenced in function _capi_cert_get_fname OLDNAMES.lib(access.obi) : error LNK2001: unresolved external symbol __imp___access MSVCRT.lib(chandler4gs.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4 release\CurlLib2UploadFile.exe : fatal error LNK1120: 16 unresolved externals jom: E:\Kobil_App\Examples\Curl_Lib_Examples\build-CurlLib2UploadFile-VC15_Kobil_Static-Release\Makefile.Release [release\CurlLib2UploadFile.exe] Error 1120 jom: E:\Kobil_App\Examples\Curl_Lib_Examples\build-CurlLib2UploadFile-VC15_Kobil_Static-Release\Makefile [release] Error 2 18:52:36: The process "D:\QT\5.9.3\Tools\QtCreator\bin\jom.exe" exited with code 2. Error while building/deploying project CurlLib2UploadFile (kit: VC15_Kobil_Static) The kit VC15_Kobil_Static has configuration issues which might be the root cause for this problem. When executing step "Make" 18:52:37: Elapsed time: 00:04. *It will realy greatful you tell me the where am i wrong.* *It is really impressing you developed libssh2 too. I know you developed other libraries but right now i have to work on it.* *If you are in IRC then reply me with you account .* *Waiting for your reply.* *Thank You.* --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html