- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试构建一个简单的 SFML 程序,但在构建程序时我不断收到这些错误。我试过谷歌,但错误总是与我的不同。我有 SFML 静态链接,这是我的链接器输入:
winmm.lib;sfml-system-s.lib;ws2_32.lib;sfml-network-s.lib;opengl32.lib;gdi32.lib;sfml-window-s.lib;freetype.lib;sfml-graphics-s.lib
我也有 SFML_STATIC 行。我不太确定是什么问题。
代码:
#ifndef __IOSTREAM_H
#include <iostream>
#endif
#include "data/movement.h"
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow mainw(sf::VideoMode(512, 512), "Window");
while (mainw.isOpen())
{
sf::Event winEvent;
while (mainw.pollEvent(winEvent))
{
if (winEvent.type == sf::Event::Closed)
{
mainw.close();
} else;
if (winEvent.type == sf::Event::KeyPressed)
{
if (winEvent.key.code == sf::Keyboard::Up)
{
upEvent();
}
else if (winEvent.key.code == sf::Keyboard::Down)
{
downEvent();
}
else if (winEvent.key.code == sf::Keyboard::Left)
{
leftEvent();
}
else if (winEvent.key.code == sf::Keyboard::Right)
{
rightEvent();
}
}
}
}
return 0;
}
错误:
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp_RegQueryValueExW referenced in function "class sf::String __cdecl
anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(JoystickImpl.cpp.obj) 1<br/>
anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(JoystickImpl.cpp.obj) 1
Error LNK2019 unresolved external symbol __imp_EnumDisplaySettingsW referenced in function "public: static class sf::VideoMode __cdecl sf::priv::VideoModeImpl::getDesktopMode(void)" (?getDesktopMode@VideoModeImpl@priv@sf@@SA?AVVideoMode@3@XZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(VideoModeImpl.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(CursorImpl.cpp.obj) 1<br/>
Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WglContext.cpp.obj) 1<br/>
Error LNK2001 unresolved external symbol __imp_GetDC OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_ReleaseDC referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(CursorImpl.cpp.obj) 1<br/>
Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WglContext.cpp.obj) 1<br/>
Error LNK2001 unresolved external symbol __imp_ReleaseDC OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_LoadCursorW referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(CursorImpl.cpp.obj) 1<br/>
Error LNK2001 unresolved external symbol __imp_LoadCursorW OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_DestroyCursor referenced in function "public: __cdecl sf::priv::CursorImpl::~CursorImpl(void)" (??1CursorImpl@priv@sf@@QEAA@XZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(CursorImpl.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_CreateIconIndirect referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromPixels(unsigned char const *,class sf::Vector2<unsigned int>,class sf::Vector2<unsigned int>)" (?loadFromPixels@CursorImpl@priv@sf@@QEAA_NPEBEV?$Vector2@I@3@1@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(CursorImpl.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_CopyIcon referenced in function "public: bool __cdecl sf::priv::CursorImpl::loadFromSystem(enum sf::Cursor::Type)" (?loadFromSystem@CursorImpl@priv@sf@@QEAA_NW4Type@Cursor@3@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(CursorImpl.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_CreateWindowExA referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WglContext.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_DestroyWindow referenced in function "public: virtual __cdecl sf::priv::WglContext::~WglContext(void)" (??1WglContext@priv@sf@@UEAA@XZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WglContext.cpp.obj) 1<br/>
Error LNK2001 unresolved external symbol __imp_DestroyWindow OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_ShowWindow referenced in function "private: void __cdecl sf::priv::WglContext::createSurface(class sf::priv::WglContext *,unsigned int,unsigned int,unsigned int)" (?createSurface@WglContext@priv@sf@@AEAAXPEAV123@III@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WglContext.cpp.obj) 1<br/>
Error LNK2001 unresolved external symbol __imp_ShowWindow OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_TrackMouseEvent referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_TranslateMessage referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_DispatchMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_PeekMessageW referenced in function "protected: virtual void __cdecl sf::priv::WindowImplWin32::processEvents(void)" (?processEvents@WindowImplWin32@priv@sf@@MEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SendMessageW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_DefWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_CallWindowProcW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_RegisterClassW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_UnregisterClassW referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_CreateWindowExW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_FlashWindowEx referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SetWindowPos referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetKeyState referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_MapVirtualKeyW referenced in function "private: static enum sf::Keyboard::Key __cdecl sf::priv::WindowImplWin32::virtualKeyCodeToSF(unsigned __int64,__int64)" (?virtualKeyCodeToSF@WindowImplWin32@priv@sf@@CA?AW4Key@Keyboard@3@_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SetCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_ReleaseCapture referenced in function "private: void __cdecl sf::priv::WindowImplWin32::cleanup(void)" (?cleanup@WindowImplWin32@priv@sf@@AEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetForegroundWindow referenced in function "public: virtual bool __cdecl sf::priv::WindowImplWin32::hasFocus(void)const " (?hasFocus@WindowImplWin32@priv@sf@@UEBA_NXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SetForegroundWindow referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SetWindowTextW referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setTitle(class sf::String const &)" (?setTitle@WindowImplWin32@priv@sf@@UEAAXAEBVString@3@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetClientRect referenced in function "public: virtual class sf::Vector2<unsigned int> __cdecl sf::priv::WindowImplWin32::getSize(void)const " (?getSize@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@I@3@XZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetWindowRect referenced in function "public: virtual class sf::Vector2<int> __cdecl sf::priv::WindowImplWin32::getPosition(void)const " (?getPosition@WindowImplWin32@priv@sf@@UEBA?AV?$Vector2@H@3@XZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_AdjustWindowRect referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_ShowCursor referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setMouseCursorVisible(bool)" (?setMouseCursorVisible@WindowImplWin32@priv@sf@@UEAAX_N@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SetCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_ScreenToClient referenced in function "private: void __cdecl sf::priv::WindowImplWin32::processEvent(unsigned int,unsigned __int64,__int64)" (?processEvent@WindowImplWin32@priv@sf@@AEAAXI_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_MapWindowPoints referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_ClipCursor referenced in function "private: void __cdecl sf::priv::WindowImplWin32::grabCursor(bool)" (?grabCursor@WindowImplWin32@priv@sf@@AEAAX_N@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SetWindowLongW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetWindowLongPtrW referenced in function "private: static __int64 __cdecl sf::priv::WindowImplWin32::globalOnEvent(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?globalOnEvent@WindowImplWin32@priv@sf@@CA_JPEAUHWND__@@I_K_J@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_SetWindowLongPtrW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(struct HWND__ *)" (??0WindowImplWin32@priv@sf@@QEAA@PEAUHWND__@@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_GetWindowThreadProcessId referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::requestFocus(void)" (?requestFocus@WindowImplWin32@priv@sf@@UEAAXXZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_CreateIcon referenced in function "public: virtual void __cdecl sf::priv::WindowImplWin32::setIcon(unsigned int,unsigned int,unsigned char const *)" (?setIcon@WindowImplWin32@priv@sf@@UEAAXIIPEBE@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_DestroyIcon referenced in function "public: virtual __cdecl sf::priv::WindowImplWin32::~WindowImplWin32(void)" (??1WindowImplWin32@priv@sf@@UEAA@XZ) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_ChangeDisplaySettingsW referenced in function "public: __cdecl sf::priv::WindowImplWin32::WindowImplWin32(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0WindowImplWin32@priv@sf@@QEAA@VVideoMode@2@AEBVString@2@IAEBUContextSettings@2@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(WindowImplWin32.cpp.obj) 1<br/>
Error LNK2019 unresolved external symbol __imp_RegCloseKey referenced in function "class sf::String __cdecl
Error LNK2019 unresolved external symbol __imp_RegOpenKeyExW referenced in function "class sf::String __cdecl `anonymous namespace'::getDeviceName(unsigned int,struct tagJOYCAPSW)" (?getDeviceName@?A0x8939b4a8@@YA?AVString@sf@@IUtagJOYCAPSW@@@Z) OSTetris C:\Users\green\Documents\GitHub\OSTetris\sfml-window-s.lib(JoystickImpl.cpp.obj) 1
Error LNK1120 50 unresolved externals OSTetris C:\Users\green\Documents\GitHub\OSTetris\x64\Release\OSTetris.exe 1
最佳答案
首先我要链接到SFML's tutorial page for Visual Studio linking .
但看起来您只链接了发布版本。确保使用调试配置下的调试库和发布配置下的发布库。每个配置都需要单独设置。
关于visual-studio - (VS2017中的SFML 2.5.1)许多 Unresolved external symbol 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54162621/
这段代码是否正确? extern "C" extern int x; // 1 extern extern "C" int y; // 2 extern "C" extern
根据 C++ Primer ,我们可以为定义为 extern 的变量提供初始化程序,但这样做会覆盖 extern。具有初始值设定项的 extern 是一个定义: extern double pi =
使用 Cuda 5.0、VS2010 这个项目在 VS2012 中编译和链接很好,但是 VS2012 不支持 Nsight 调试所以我也在 VS2010 中开发。所以我有一个 VS2010 项目文件,
这个问题已经有答案了: How do I use extern to share variables between source files? (19 个回答) Different compilat
我正在编写供 C 程序使用的 C++ 共享库。但是,我对 extern 和 extern "C" 有疑问。 考虑以下代码 我的头文件是这样的: #ifdef __cplusplus
我对整个 header 使用 extern "C" 说明符,还是为每个函数指定 extern 有区别吗? 据我所知,没有,因为只有函数和变量可以外部链接,所以当我在每个函数原型(prototype)和
这个问题在这里已经有了答案: What is the effect of extern "C" in C++? (17 个答案) 关闭 7 年前。 我见过 C/C++ 代码使用在函数签名中声明的 e
所以我使用 svn:externals 来检查一个外部仓库。外部仓库有自己的 svn-externals 设置。 现在,当更新我的项目的工作副本时,来自外部存储库的文件正在更新,但它的外部文件没有。该
是否可以忽略 svn:externals 属性中引用的标记的外部依赖性?这听起来像是一个很奇怪的问题,但让我解释一下...... 我收集了大量独立的“可插入”代码模块,每个模块都可以作为独立项目进行独
我见过 2 种创建全局变量的方法,有什么区别,什么时候使用它们? //.h extern NSString * const MyConstant; //.m NSString * const MyCo
我在 test 模块下通过 stripe api 在 stripe 中创建了一个帐户。并与该账户绑定(bind)一个银行账户。转到 Stripe dashboard -> connect -> acc
我在下面有一个代码。它是由 qemu 程序(一个 C 程序)使用 dlopen 加载的动态共享库的一部分。 extern "C" { extern uint64_t host_virt_offset;
C++ Primer 第 5 版第 60 页讨论了如何跨文件共享 const 变量 //file_1.cc extern const int bufSize = fcn(); //file_1.h e
这个 Unresolved external 问题有什么问题?我正在尝试将其实现到我的 MFC 应用程序的 InitInstance 中。但是我从调试器中收到此行错误。 LNK2019: unreso
在 C++ 中,extern(后面不跟语言链接字符串文字)似乎对命名空间范围 (Difference between declaration of function with extern and w
假设我有 3 个文件:file1.c、file2.c 和 globals.h。 file1.c 和 file2.c 都包含 globals.h。 file1.c 包含 file2.c 需要使用的结构。
我正在为具有 16 位安装程序的旧 CD-ROM 游戏编写新的安装程序,安装程序需要在硬盘上并且能够从原始光盘复制文件。如果所有游戏文件都打包在安装程序中,我已经设置了一个可以安装游戏的脚本,这适合个
在编译我的代码时,我收到此错误。 1>MSVCRTD.lib(crtexe.obj):错误 LNK2019:函数 ___tmainCRTStartup 中引用了未解析的外部符号 _main1>C:\U
我试图将 cimg 库包装在 c++/clr 中,当我尝试构建它时,我遇到了一堆链接错误。 Error 20 error LNK2028: unresolved token (0A0002AC)
我一直遇到这两个错误,但我似乎找不到有效的解决方案。 LNK1120: 1 unresolved externals Error 1 error LNK2019: unresolved externa
我是一名优秀的程序员,十分优秀!