[英]SteamFriends unresolved external symbol
I have been following the Steamworks documentation to a T, but I am running into linker errors. 我一直在遵循Steamworks文档中的T,但是遇到链接器错误。
I know that the API is installed correctly and imported correctly, because I can include any steam header file and it finds it properly, and when I run my game, the Steam overlay shows up. 我知道该API已正确安装并正确导入,因为我可以包含任何Steam标头文件并且可以正确找到它,并且在运行游戏时,Steam叠加层会显示出来。
However, I recently tried to access the community part of the API, particularly to get the user's friends. 但是,我最近尝试访问API的社区部分,特别是为了获得用户的朋友。 According to the documentation, you are to use the SteamFriends() symbol for that.
根据文档,您将为此使用SteamFriends()符号。
I have included steam_api.h
, steam_gameserver.h
, isteamfriends.h
, and isteamutils.h
in my accessing object's header, and I have also added the steam_api.dll
and steam_api.lib
to my project, but no dice. 我在访问对象的标头中包含了
steam_api.h
, steam_gameserver.h
, isteamfriends.h
和isteamutils.h
,并且还向我的项目中添加了steam_api.dll
和steam_api.lib
,但没有骰子。
Every time, I get the following error: 每次,都会出现以下错误:
error LNK2019: unresolved external symbol _imp_SteamFriends
错误LNK2019:无法解析的外部符号_imp_SteamFriends
Has anyone successfully done this? 有人成功做到了吗?
After scrounging the internet for any documentation, I found the problem. 在搜寻互联网上的任何文档后,我发现了问题。
Epic expects you to link all libraries and perform all includes that you need manually. Epic希望您链接所有库并手动执行所需的所有库。
This meant that I had to add the directory where all of the steam_api.lib
, steam_api64.lib
, etc files were stored to the configuration, and then I needed to link it in the actual files using 这意味着我必须添加将所有
steam_api.lib
, steam_api64.lib
等文件存储到配置的目录,然后我需要使用链接到实际文件中
#pragma comment(lib, "win64/steam_api64")
So on a side note, they need help with their documentation; 因此,顺便说一句,他们需要文档帮助。 that was way harder to figure out than it should be.
那真是难以想象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.