Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: unresolved external symbol GLEW  (Read 5865 times)

0 Members and 1 Guest are viewing this topic.

wmok

  • Newbie
  • *
  • Posts: 1
    • View Profile
unresolved external symbol GLEW
« on: July 07, 2014, 03:57:17 am »
I downloaded the SFML source code (SFML-master.zip) and tried compiling it under MS visual studio 2010 express as a dynamic library. I had the following unresolved linking error. Am I missing some .lib file or preprocessor definition?

Thanks.

William


1>     Creating library E:\from_windows_xp_pc\MyProjects\box2dgame_cpp\Debug\SFML-2.1.lib and object E:\from_windows_xp_pc\MyProjects\box2dgame_cpp\Debug\SFML-2.1.exp
1>GLCheck.obj : error LNK2019: unresolved external symbol __imp__glewGetErrorString referenced in function "void __cdecl sf::priv::ensureGlewInit(void)" (?ensureGlewInit@priv@sf@@YAXXZ)
1>GLCheck.obj : error LNK2019: unresolved external symbol __imp__glewInit referenced in function "void __cdecl sf::priv::ensureGlewInit(void)" (?ensureGlewInit@priv@sf@@YAXXZ)
1>RenderTarget.obj : error LNK2001: unresolved external symbol __imp____glewBlendFuncSeparateEXT
1>RenderTarget.obj : error LNK2001: unresolved external symbol __imp____GLEW_EXT_blend_func_separate
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewDeleteFramebuffersEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewDeleteRenderbuffersEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____GLEW_EXT_framebuffer_object
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewCheckFramebufferStatusEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferTexture2DEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewFramebufferRenderbufferEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewRenderbufferStorageEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewBindRenderbufferEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewGenRenderbuffersEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewBindFramebufferEXT
1>RenderTextureImplFBO.obj : error LNK2001: unresolved external symbol __imp____glewGenFramebuffersEXT
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewDeleteObjectARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewUniform1fARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewUseProgramObjectARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewGetHandleARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewUniform2fARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewUniform3fARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewUniform4fARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewUniformMatrix4fvARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewUniform1iARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____GLEW_ARB_fragment_shader
1>Shader.obj : error LNK2001: unresolved external symbol __imp____GLEW_ARB_vertex_shader
1>Shader.obj : error LNK2001: unresolved external symbol __imp____GLEW_ARB_shader_objects
1>Shader.obj : error LNK2001: unresolved external symbol __imp____GLEW_ARB_shading_language_100
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewLinkProgramARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewAttachObjectARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewGetInfoLogARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewGetObjectParameterivARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewCompileShaderARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewShaderSourceARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewCreateShaderObjectARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewCreateProgramObjectARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewActiveTextureARB
1>Shader.obj : error LNK2001: unresolved external symbol __imp____glewGetUniformLocationARB
1>Texture.obj : error LNK2001: unresolved external symbol __imp____GLEW_ARB_texture_non_power_of_two
1>SFML_Main.obj : error LNK2019: unresolved external symbol _main referenced in function _WinMain@16
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__freeaddrinfo@4 referenced in function "unsigned int __cdecl `anonymous namespace'::resolve(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?resolve@?A0x38a1ae9b@@YAIABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__getaddrinfo@16 referenced in function "unsigned int __cdecl `anonymous namespace'::resolve(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?resolve@?A0x38a1ae9b@@YAIABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__inet_addr@4 referenced in function "unsigned int __cdecl `anonymous namespace'::resolve(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?resolve@?A0x38a1ae9b@@YAIABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "public: __thiscall sf::IpAddress::IpAddress(unsigned char,unsigned char,unsigned char,unsigned char)" (??0IpAddress@sf@@QAE@EEEE@Z)
1>Packet.obj : error LNK2001: unresolved external symbol __imp__htonl@4
1>TcpSocket.obj : error LNK2001: unresolved external symbol __imp__htonl@4
1>SocketImpl.obj : error LNK2001: unresolved external symbol __imp__htonl@4
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__inet_ntoa@4 referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall sf::IpAddress::toString(void)const " (?toString@IpAddress@sf@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__ntohl@4 referenced in function "public: unsigned int __thiscall sf::IpAddress::toInteger(void)const " (?toInteger@IpAddress@sf@@QBEIXZ)
1>Packet.obj : error LNK2001: unresolved external symbol __imp__ntohl@4
1>TcpSocket.obj : error LNK2001: unresolved external symbol __imp__ntohl@4
1>UdpSocket.obj : error LNK2001: unresolved external symbol __imp__ntohl@4
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__getsockname@12 referenced in function "public: static class sf::IpAddress __cdecl sf::IpAddress::getLocalAddress(void)" (?getLocalAddress@IpAddress@sf@@SA?AV12@XZ)
1>TcpListener.obj : error LNK2001: unresolved external symbol __imp__getsockname@12
1>TcpSocket.obj : error LNK2001: unresolved external symbol __imp__getsockname@12
1>UdpSocket.obj : error LNK2001: unresolved external symbol __imp__getsockname@12
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "public: static class sf::IpAddress __cdecl sf::IpAddress::getLocalAddress(void)" (?getLocalAddress@IpAddress@sf@@SA?AV12@XZ)
1>TcpSocket.obj : error LNK2001: unresolved external symbol __imp__connect@12
1>IpAddress.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: static class sf::IpAddress __cdecl sf::IpAddress::getLocalAddress(void)" (?getLocalAddress@IpAddress@sf@@SA?AV12@XZ)
1>Socket.obj : error LNK2001: unresolved external symbol __imp__socket@12
1>Packet.obj : error LNK2019: unresolved external symbol __imp__ntohs@4 referenced in function "public: class sf::Packet & __thiscall sf::Packet::operator>>(short &)" (??5Packet@sf@@QAEAAV01@AAF@Z)
1>TcpListener.obj : error LNK2001: unresolved external symbol __imp__ntohs@4
1>TcpSocket.obj : error LNK2001: unresolved external symbol __imp__ntohs@4
1>UdpSocket.obj : error LNK2001: unresolved external symbol __imp__ntohs@4
1>Packet.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "public: class sf::Packet & __thiscall sf::Packet::operator<<(short)" (??6Packet@sf@@QAEAAV01@F@Z)
1>SocketImpl.obj : error LNK2001: unresolved external symbol __imp__htons@4
1>Socket.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "protected: void __thiscall sf::Socket::create(unsigned int)" (?create@Socket@sf@@IAEXI@Z)
1>SocketSelector.obj : error LNK2019: unresolved external symbol __imp__select@20 referenced in function "public: bool __thiscall sf::SocketSelector::wait(class sf::Time)" (?wait@SocketSelector@sf@@QAE_NVTime@2@@Z)
1>TcpSocket.obj : error LNK2001: unresolved external symbol __imp__select@20
1>SocketSelector.obj : error LNK2019: unresolved external symbol ___WSAFDIsSet@8 referenced in function "public: bool __thiscall sf::SocketSelector::isReady(class sf::Socket &)const " (?isReady@SocketSelector@sf@@QBE_NAAVSocket@2@@Z)
1>TcpListener.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function "public: enum sf::Socket::Status __thiscall sf::TcpListener::listen(unsigned short)" (?listen@TcpListener@sf@@QAE?AW4Status@Socket@2@G@Z)
1>TcpListener.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: enum sf::Socket::Status __thiscall sf::TcpListener::listen(unsigned short)" (?listen@TcpListener@sf@@QAE?AW4Status@Socket@2@G@Z)
1>UdpSocket.obj : error LNK2001: unresolved external symbol __imp__bind@12
1>TcpListener.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function "public: enum sf::Socket::Status __thiscall sf::TcpListener::accept(class sf::TcpSocket &)" (?accept@TcpListener@sf@@QAE?AW4Status@Socket@2@AAVTcpSocket@2@@Z)
1>TcpSocket.obj : error LNK2019: unresolved external symbol __imp__getpeername@12 referenced in function "public: class sf::IpAddress __thiscall sf::TcpSocket::getRemoteAddress(void)const " (?getRemoteAddress@TcpSocket@sf@@QBE?AVIpAddress@2@XZ)
1>TcpSocket.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "public: enum sf::Socket::Status __thiscall sf::TcpSocket::send(void const *,unsigned int)" (?send@TcpSocket@sf@@QAE?AW4Status@Socket@2@PBXI@Z)
1>TcpSocket.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "public: enum sf::Socket::Status __thiscall sf::TcpSocket::receive(void *,unsigned int,unsigned int &)" (?receive@TcpSocket@sf@@QAE?AW4Status@Socket@2@PAXIAAI@Z)
1>UdpSocket.obj : error LNK2019: unresolved external symbol __imp__sendto@24 referenced in function "public: enum sf::Socket::Status __thiscall sf::UdpSocket::send(void const *,unsigned int,class sf::IpAddress const &,unsigned short)" (?send@UdpSocket@sf@@QAE?AW4Status@Socket@2@PBXIABVIpAddress@2@G@Z)
1>UdpSocket.obj : error LNK2019: unresolved external symbol __imp__recvfrom@24 referenced in function "public: enum sf::Socket::Status __thiscall sf::UdpSocket::receive(void *,unsigned int,unsigned int &,class sf::IpAddress &,unsigned short &)" (?receive@UdpSocket@sf@@QAE?AW4Status@Socket@2@PAXIAAIAAVIpAddress@2@AAG@Z)
1>SocketImpl.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: static void __cdecl sf::priv::SocketImpl::close(unsigned int)" (?close@SocketImpl@priv@sf@@SAXI@Z)
1>SocketImpl.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function "public: static void __cdecl sf::priv::SocketImpl::setBlocking(unsigned int,bool)" (?setBlocking@SocketImpl@priv@sf@@SAXI_N@Z)
1>SocketImpl.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function "public: static enum sf::Socket::Status __cdecl sf::priv::SocketImpl::getErrorStatus(void)" (?getErrorStatus@SocketImpl@priv@sf@@SA?AW4Status@Socket@3@XZ)
1>SocketImpl.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "public: __thiscall sf::priv::SocketInitializer::SocketInitializer(void)" (??0SocketInitializer@priv@sf@@QAE@XZ)
1>SocketImpl.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function "public: __thiscall sf::priv::SocketInitializer::~SocketInitializer(void)" (??1SocketInitializer@priv@sf@@QAE@XZ)
1>JoystickImpl.obj : error LNK2019: unresolved external symbol __imp__joyGetPosEx@8 referenced in function "public: static void __cdecl sf::priv::JoystickImpl::initialize(void)" (?initialize@JoystickImpl@priv@sf@@SAXXZ)
1>JoystickImpl.obj : error LNK2019: unresolved external symbol __imp__joyGetDevCapsW@12 referenced in function "public: bool __thiscall sf::priv::JoystickImpl::open(unsigned int)" (?open@JoystickImpl@priv@sf@@QAE_NI@Z)
1>E:\from_windows_xp_pc\MyProjects\box2dgame_cpp\Debug\SFML-2.1.dll : fatal error LNK1120: 69 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: unresolved external symbol GLEW
« Reply #1 on: July 07, 2014, 04:21:29 am »
Obviously you didn't pick dynamic, or you wouldn't be getting those errors. The errors come from you trying to build a static version of SFML, and since the latest sources require you to manually link the dependencies when building statically that is what you must do (or switch to dynamic in CMake).
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor