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

Author Topic: Cant get SFML working  (Read 4368 times)

0 Members and 1 Guest are viewing this topic.

Chay Hawk

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Email
Cant get SFML working
« on: September 20, 2014, 07:55:50 am »
I had to restart my computer completley and I cant seem to get SFML working again. Last time I built it with Cmake but i dont want to do that this time, I am using a pre compiled binary, I am using SFGUI-TDM-481r3-32.7z

from

http://nightlybuilds.ch/

I am using code blocks:

codeblocks-13.12mingw-setup-TDM-GCC-481.exe

I set up SFML exactly as its shown in the tutorial on the site here. except i put -s on the end of all my libraries. I get these errors in code blocks

Also I should mention i am using the code example from the tutorials.

||=== Build: Debug in SFML Test (compiler: GNU GCC Compiler) ===|
C:\SFML\lib\libsfml-graphics-s.a(RenderWindow.cpp.obj):RenderWindow.cpp|| undefined reference to `glReadPixels@28'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glClearColor@16'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPopMatrix@0'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPopMatrix@0'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPopMatrix@0'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPopClientAttrib@0'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glViewport@16'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glLoadMatrixf@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__GLEW_EXT_blend_func_separate'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__glewBlendFuncSeparateEXT'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__GLEW_EXT_blend_equation_separate'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__glewBlendEquationSeparateEXT'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glBlendFunc@8'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__GLEW_EXT_blend_equation_separate'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__glewBlendEquation'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glBlendFunc@8'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__GLEW_ARB_multitexture'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glDisable@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glDisable@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glDisable@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glDisable@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glEnable@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glEnable@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glEnableClientState@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glEnableClientState@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glEnableClientState@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glLoadMatrixf@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__glewClientActiveTextureARB'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `__glewActiveTextureARB'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPushClientAttrib@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPushAttrib@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPushMatrix@0'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPushMatrix@0'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glMatrixMode@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glPushMatrix@0'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glVertexPointer@16'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glColorPointer@16'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glTexCoordPointer@16'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glDrawArrays@12'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glLoadMatrixf@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glLoadMatrixf@4'|
C:\SFML\lib\libsfml-graphics-s.a(RenderTarget.cpp.obj):RenderTarget.cpp|| undefined reference to `glClear@4'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Re: Cant get SFML working
« Reply #1 on: September 20, 2014, 08:26:09 am »
I am using a pre compiled binary, I am using SFGUI-TDM-481r3-32.7z
I assume this is a mistake, since SFGUI != SFML, right?

As for the errors, check out this: https://github.com/SFML/SFML/wiki/FAQ#wiki-build-link-static
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Chay Hawk

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Email
Re: Cant get SFML working
« Reply #2 on: September 20, 2014, 08:44:29 am »
Yeah I meant to put SFML link there but I did all that stuff in the link you gave me and it did nothing.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Cant get SFML working
« Reply #3 on: September 20, 2014, 09:46:42 am »
The error show that you're not linking against OpenGL or not in the right order.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Chay Hawk

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Email
Re: Cant get SFML working
« Reply #4 on: September 20, 2014, 11:20:38 pm »
I'm linking it in exactly the same order shown in the link you gave me. I'm not linking specifically to glew though, but I didnt the last time i installed sfml and it still worked.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Cant get SFML working
« Reply #5 on: September 20, 2014, 11:37:37 pm »
Well... then the question begs to be asked: What happens if you do link to glew and opengl32? If trial and error is as simple as adding/removing a few lines, then there is little reason not to try it sometimes ;).

Bear in mind that the ordering of the libraries do matter, since you are using MinGW.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Chay Hawk

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Email
Re: Cant get SFML working
« Reply #6 on: September 21, 2014, 12:39:57 am »
Ok that seemed to whittle down my errors from 50 to 5, but i don't know what these mean

||=== Build: Debug in SFML Test (compiler: GNU GCC Compiler) ===|
C:\SFML\lib\libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp|| undefined reference to `SwapBuffers@4'|
C:\SFML\lib\libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp|| undefined reference to `ChoosePixelFormat@8'|
C:\SFML\lib\libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp|| undefined reference to `DescribePixelFormat@16'|
C:\SFML\lib\libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp|| undefined reference to `SetPixelFormat@12'|
C:\SFML\lib\libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp|| undefined reference to `DescribePixelFormat@16'|
||=== Build failed: 5 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I am linking to (in order after the sfml stuff)

glew
freetype
jpeg
openal32
opengl32

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Cant get SFML working
« Reply #7 on: September 21, 2014, 01:01:41 am »
libsfml-window-s.a
This also needs its dependencies... You can find it as well by following the link eXpl0it3r posted.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Chay Hawk

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • Email
Re: Cant get SFML working
« Reply #8 on: September 21, 2014, 01:14:29 am »
Ok cool got it working :D, thanks for the help, got SFGUI working too.
« Last Edit: September 21, 2014, 01:18:05 am by Chay Hawk »