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

Author Topic: SFML 2.1 & VS 2012  (Read 4014 times)

0 Members and 1 Guest are viewing this topic.

sknnywhiteman

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
SFML 2.1 & VS 2012
« on: November 25, 2013, 04:33:47 am »
so, I downloaded SFML 2.1 to build with CMake so I can change the static libraries to not use the standard libraries, but when I do, I get 42 linker errors. I followed the tutorial as closely as possible, but I either missed something, or I'm derping somewhere.

Quote
1>sfml-graphics-s.lib(Texture.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_texture_non_power_of_two
1>sfml-graphics-s.lib(RenderTarget.obj) : error LNK2001: unresolved external symbol ___glewBlendFuncSeparateEXT
1>sfml-graphics-s.lib(RenderTarget.obj) : error LNK2001: unresolved external symbol ___GLEW_EXT_blend_func_separate
1>sfml-graphics-s.lib(GLCheck.obj) : error LNK2001: unresolved external symbol _glewInit
1>sfml-graphics-s.lib(GLCheck.obj) : error LNK2001: unresolved external symbol _glewGetErrorString
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewActiveTextureARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewAttachObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewCompileShaderARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewCreateProgramObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewCreateShaderObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewDeleteObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetHandleARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetInfoLogARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetObjectParameterivARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetUniformLocationARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewLinkProgramARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewShaderSourceARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform1fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform1iARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform2fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform3fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform4fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniformMatrix4fvARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUseProgramObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_fragment_shader
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_shader_objects
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_shading_language_100
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_vertex_shader
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_std_error
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_CreateCompress
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_destroy_compress
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_stdio_dest
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_set_defaults
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_set_quality
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_start_compress
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_write_scanlines
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_finish_compress
1>sfml-system-s.lib(SleepImpl.obj) : error LNK2001: unresolved external symbol __imp__timeGetDevCaps@8
1>sfml-system-s.lib(SleepImpl.obj) : error LNK2001: unresolved external symbol __imp__timeBeginPeriod@4
1>sfml-system-s.lib(SleepImpl.obj) : error LNK2001: unresolved external symbol __imp__timeEndPeriod@4
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol __imp__joyGetPosEx@8
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol __imp__joyGetDevCapsW@12


I'm assuming I'm missing something small, but I have SFML_STATIC, I'm using /MT, I built SFML Statically (I only have the '-s.lib's), and I built with the SFML_USE_STD_LIBS flag set to false so I can link statically, but apparently I can't. Does anything jump out at you? I also use glew from their website so I can use Vertex Buffer Objects for rendering with OpenGL.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: SFML 2.1 & VS 2012
« Reply #1 on: November 25, 2013, 08:30:06 am »
so, I downloaded SFML 2.1 to build with CMake
If you're downloading the source code from GitHub, you're not downloading SFML 2.1 since that was already released. ;)

With the latest changes SFML requires you now to link the dependencies yourself when you choose static linking. Since the source is something in development the tutorials haven't been adjusted yet.
Background information can be found here.

The dependencies are to my knowledge:

sfml-audio-s
sndfile
openal32

sfml-graphics-s
jpeg
glew
freetype

sfml-network-s
ws2_32

sfml-window-s
opengl32
gdi32

sfml-system-s
winmm

With the defines:
GLEW_STATIC
SFML_STATIC
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

sknnywhiteman

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: SFML 2.1 & VS 2012
« Reply #2 on: November 25, 2013, 03:46:02 pm »
Did this change happen before or after the 2.1 release? Could I just bypass it by remaking the actual 2.1 release instead of from github?

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
Re: SFML 2.1 & VS 2012
« Reply #3 on: November 25, 2013, 04:24:05 pm »
Yeah, just checkout the 2.1 tag with git after cloning. Or get the source package from http://www.sfml-dev.org/download/sfml/2.1/ .

sknnywhiteman

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: SFML 2.1 & VS 2012
« Reply #4 on: November 25, 2013, 04:28:41 pm »
Nice! I'm at work so I can't work on it right now, but I'll come back if I have any problems. Thanks!

sknnywhiteman

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: SFML 2.1 & VS 2012
« Reply #5 on: November 25, 2013, 09:28:50 pm »
well, I rebuilt using the source from the 2.1 downloads page (instead of github), and now my linker errors have changed, and instead of 42 errors, I have 41. They all have to do with sfml-window-s.lib, and the last ones all had to do with glew..

Quote
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__SetCursorPos@8
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__GetCursorPos@4
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__ClientToScreen@8
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__ScreenToClient@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ScreenToClient@8
1>sfml-window-s.lib(VideoModeImpl.obj) : error LNK2001: unresolved external symbol __imp__EnumDisplaySettingsA@12
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__TranslateMessage@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__PeekMessageA@20
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SendMessageA@16
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcA@16
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CallWindowProcA@20
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassA@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__MapVirtualKeyA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetCapture@0
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetCapture@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ReleaseCapture@0
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowTextA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowTextW@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetClientRect@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__AdjustWindowRect@12
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetCursor@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongA@12
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__LoadCursorA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateIcon@28
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DestroyIcon@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ChangeDisplaySettingsA@8

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: SFML 2.1 & VS 2012
« Reply #6 on: November 25, 2013, 09:38:19 pm »
Did you remove all the "additional dependencies" that were listed in the "input" field? Because if you did, you're now missing those libraries. You can now either go and Google the part between __imp__ and @ to look up on the MSDN site which library you're missing, or you can create a new project and make sure to not delete the other libraries. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

sknnywhiteman

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • Email
Re: SFML 2.1 & VS 2012
« Reply #7 on: November 25, 2013, 09:55:33 pm »
Damn. xD
That's one way to make me feel stupid. :P
I created a new project to copy and paste them, and it runs like a charm. Thanks for the help.

 

anything