是否可以链接*.lib
与 MinGW 一起使用文件(我将其与 Eclipse 一起使用)?
我正在与 libcurl+OpenSSL 作斗争,我不明白我的错误是否是因为我尝试使用.lib
-MinGW 中的文件或其他错误:
..\lib/libeay32.lib(tmp32/asn_mime.obj):(.text[_SMIME_text]+0x6): undefined reference to `_chkstk'
..\lib/libeay32.lib(tmp32/asn_mime.obj):(.text[_SMIME_text]+0xb): undefined reference to `__security_cookie'
..\lib/libeay32.lib(tmp32/asn_mime.obj):(.text[_SMIME_text]+0x63): undefined reference to `@__security_check_cookie@4'
..\lib/libeay32.lib(tmp32/asn_mime.obj):(.text[_SMIME_text]+0x19e): undefined reference to `@__security_check_cookie@4'
..\lib/libeay32.lib(tmp32/ech_ossl.obj):(.text[_ecdh_compute_key]+0x6): undefined reference to `_chkstk'
..\lib/libeay32.lib(tmp32/bio_asn1.obj):(.text[_asn1_bio_set_ex]+0x6): undefined reference to `_chkstk'
..\lib/libeay32.lib(tmp32/bio_asn1.obj):(.text[_asn1_bio_get_ex]+0x6): undefined reference to `_chkstk'
..\lib/libeay32.lib(tmp32/bio_asn1.obj):(.text[_BIO_asn1_set_prefix]+0x6): undefined reference to `_chkstk'
..\lib/libeay32.lib(tmp32/bio_asn1.obj):(.text[_BIO_asn1_get_prefix]+0x6): undefined reference to `_chkstk'
..\lib/libeay32.lib(tmp32/bio_asn1.obj):(.text[_BIO_asn1_set_suffix]+0x6): more undefined references to `_chkstk' follow
..\lib/ssleay32.lib(tmp32/ssl_lib.obj):(.text[_SSL_has_matching_session_id]+0xb): undefined reference to `__security_cookie'
mingw 还接受扩展名为 .lib 的库。
例如,一个名为
库样本库
必须链接为
-L -llibsample
参考:http://www.mingw.org/wiki/Specify_the_libraries_for_the_linker_to_use http://www.mingw.org/wiki/Specify_the_libraries_for_the_linker_to_use
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)