【问题标题】:Linker Error while using openssl使用 openssl 时出现链接器错误
【发布时间】:2013-12-25 08:15:45
【问题描述】:

我这里有 openssl 文件夹:

C:\Dev-Cpp\include\openssl

在 dev c++ 中,我将以下内容提供给链接器命令行:

-lssl -lcrypto -l<C:\Dev-Cpp\include\openssl>

以及调用编译器时的以下内容:

-L<C:\Dev-Cpp\include\openssl>

编译后 dev c++ 显示此错误:

cannot find -l<C:\Dev-Cpp\include\openssl> 
ld returned 1 exit status 

【问题讨论】:

    标签: c linker openssl


    【解决方案1】:

    从链接行命令中删除-l&lt;C:\Dev-Cpp\include\openssl&gt;

    -lssl -lcrypto
    

    您已经使用 -lssl -lcrypto 链接到 openssl 库

    如果要指定保存库的路径。你必须只使用

    -L<C:\Dev-Cpp\include\openssl>
    

    【讨论】:

    • ...我怀疑应该删除 &lt;&gt;
    • 我按照你说的做了,但现在出现了错误:[链接器错误]未定义对AES_set_encrypt_key' [Linker error] undefined reference to AES_encrypt' ld 的引用返回了 1 个退出状态@MOHAMED
    • 您是否尝试将&lt;&gt; 从类似-LC:\Dev-Cpp\include\openssl 的路径中删除
    • 可能你的路径应该像这样-LC:\\Dev-Cpp\\include\\openssl
    猜你喜欢
    • 2020-06-07
    • 2012-09-27
    • 2011-10-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多