error LNK2019: 无法解析的外部符号 __imp_GetUserObjectInformationW,该符号在函数 OPENSSL_isservice 中被引用...

错误 18 error LNK2019: 无法解析的外部符号 __imp_GetUserObjectInformationW,该符号在函数 OPENSSL_isservice 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(cryptlib.obj) SimpleAuthenticator
错误 19 error LNK2019: 无法解析的外部符号 __imp_GetProcessWindowStation,该符号在函数 OPENSSL_isservice 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(cryptlib.obj) SimpleAuthenticator
错误 20 error LNK2019: 无法解析的外部符号 __imp_GetDesktopWindow,该符号在函数 OPENSSL_isservice 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(cryptlib.obj) SimpleAuthenticator
错误 21 error LNK2019: 无法解析的外部符号 __imp_MessageBoxW,该符号在函数 OPENSSL_showfatal 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(cryptlib.obj) SimpleAuthenticator
错误 22 error LNK2019: 无法解析的外部符号 __imp_DeregisterEventSource,该符号在函数 OPENSSL_showfatal 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(cryptlib.obj) SimpleAuthenticator
错误 23 error LNK2019: 无法解析的外部符号 __imp_ReportEventW,该符号在函数 OPENSSL_showfatal 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(cryptlib.obj) SimpleAuthenticator
错误 24 error LNK2019: 无法解析的外部符号 __imp_RegisterEventSourceW,该符号在函数 OPENSSL_showfatal 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(cryptlib.obj) SimpleAuthenticator
错误 25 error LNK2019: 无法解析的外部符号 __imp_DeleteDC,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 26 error LNK2019: 无法解析的外部符号 __imp_DeleteObject,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 27 error LNK2019: 无法解析的外部符号 __imp_GetBitmapBits,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 28 error LNK2019: 无法解析的外部符号 __imp_BitBlt,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 29 error LNK2019: 无法解析的外部符号 __imp_GetObjectW,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 30 error LNK2019: 无法解析的外部符号 __imp_SelectObject,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 31 error LNK2019: 无法解析的外部符号 __imp_CreateCompatibleBitmap,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 32 error LNK2019: 无法解析的外部符号 __imp_GetDeviceCaps,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 33 error LNK2019: 无法解析的外部符号 __imp_CreateCompatibleDC,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 34 error LNK2019: 无法解析的外部符号 __imp_CreateDCW,该符号在函数 readscreen 中被引用 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\SimpleAuthenticator\libeay64.lib(rand_win.obj) SimpleAuthenticator
错误 35 error LNK1120: 17 个无法解析的外部命令 E:\FileRecv\SimpleAuthenticator(1)\SimpleAuthenticator\x64\Debug\SimpleAuthenticator.dll SimpleAuthenticator

参考MSDN:https://msdn.microsoft.com/en-us/library/ms683238(VS.85).aspx

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

GetUserObjectInformationW (Unicode) and GetUserObjectInformationA (ANSI)

我们要找的就是Library:User32.lib,如果想以静态引用的方式使用GetUserObjectInformation API,就需要将 User32.lib 加入链接器输入的附加依赖项,操作方法如下图:
在解决方案资源管理器中选中对应的项目
这里写图片描述
点击项目菜单》属性,或者是直接在项目上单击鼠标右键》属性
这里写图片描述
展开配置属性》链接器,选中输入,点击附加依赖项右侧的下拉框,在弹出的菜单中点击编辑
这里写图片描述
输入附加依赖项,点击确定。
这里写图片描述

error lnk2019: 无法解析外部符号 __imp___gmp_printf,函数 main 引用了该符号。 这个错误通常是由于在链接过程找不到所需的库文件而导致的。 一种可能的原因是在代码使用了 GMP (GNU Multiple Precision Arithmetic Library) 库的 __gmp_printf 函数,但在链接阶段未正确地指定相关的库文件。 为了解决这个错误,我们需要做以下几个步骤: 1. 确保已正确安装 GMP 库:在编译代码之前,我们需要先将 GMP 库安装到系统。这可以通过下载 GMP 库的源代码并按照其提供的安装说明进行操作来完成。 2. 在编译命令添加正确的链接选项:在编译代码时,我们需要在编译命令添加正确的链接选项,以告诉编译器需要链接 GMP 库。具体来说,我们需要在编译命令添加 -lgmp 选项,以指定要链接的 GMP 库。 例如,在使用 gcc 编译器进行编译时,我们可以将以下选项添加到编译命令: gcc filename.c -lgmp 3. 确保库文件的路径正确:如果你已经正确地安装了 GMP 库,但仍然遇到这个错误,可能是因为编译器无法正确找到 GMP 库的安装路径。在这种情况下,我们需要通过在编译命令添加 -L 选项来指定库文件的路径。 例如,在使用 gcc 编译器进行编译时,我们可以使用以下命令指定库文件的路径: gcc filename.c -L /path/to/gmp/lib -lgmp 通过执行以上步骤,我们应该能够解决 error lnk2019: 无法解析外部符号 __imp___gmp_printf 这个错误,并且成功编译并链接包含 GMP 库函数调用的代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值