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

Author Topic: [Resolved] SFML 2.3 : New dependencies ?  (Read 3586 times)

0 Members and 1 Guest are viewing this topic.

Rodd

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
[Resolved] SFML 2.3 : New dependencies ?
« on: May 18, 2015, 11:56:04 am »
(French: http://fr.sfml-dev.org/forums/index.php?topic=18182.msg130862#new )

I have some problems with SFML 2.3. I changed dependencies in my project for that but my compile fails.

Quote
... -lroddgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-network-s -lsfml-audio-s -lsfml-system-s -lfreetype -ljpeg -lopengl32 -lwinmm -lgdi32 -lopenal32 -lflac -logg -lvorbis -lvorbisenc -lvorbisfile -lpthread -lboost_system-mgw48-s-1_55 -lboost_filesystem-mgw48-s-1_55 -lboost_thread-mgw48-mt-s-1_55 ...
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x1ec): référence indéfinie vers « oggpack_writeinit »
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x204): référence indéfinie vers « oggpack_writeinit »
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x38b): référence indéfinie vers « oggpack_writeclear »

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:/SFML/lib/libvorbis.a(block.o): bad reloc address 0x20 in section `.eh_frame'
collect2.exe: error: ld returned 1 exit status

I try to compile my static library.

Thank you ! :)
« Last Edit: May 18, 2015, 01:49:39 pm by Rodd »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
Re: SFML 2.3 : New dependencies ?
« Reply #1 on: May 18, 2015, 11:58:50 am »
See the official tutorials for the new dependencies.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Rodd

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
Re: SFML 2.3 : New dependencies ?
« Reply #2 on: May 18, 2015, 12:23:58 pm »
Where ? :) I have Windows and the officiel tutoriel say
Quote
On Windows and Mac OS X, all the required dependencies are provided alongside SFML so you won't have to download/install anything else. Building will work out of the box.
But i try to compile a static library. So, i need link all dependencies :D
I look a little down in the "Linux" part..

Quote
freetype
jpeg
x11 (linux only)
xrandr (linux only)
xcb (linux only)
x11-xcb (linux only)
xcb-randr (linux only)
xcb-image (linux only)

opengl
flac
ogg
vorbis
vorbisenc
vorbisfile
openal
pthread
But with that, i have this problem :
Quote
... -lroddgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-network-s -lsfml-audio-s -lsfml-system-s -lfreetype -ljpeg -lopengl32 -lflac -logg -lvorbis -lvorbisenc -lvorbisfile -lopenal32 -lpthread -lboost_system-mgw48-s-1_55 -lboost_filesystem-mgw48-s-1_55 -lboost_thread-mgw48-mt-s-1_55...
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0x108): référence indéfinie vers « SwapBuffers@4 »
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0xa28): référence indéfinie vers « ChoosePixelFormat@8 »
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0x124c): référence indéfinie vers « DescribePixelFormat@16 »
C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj):WglContext.cpp:(.text+0x1284): référence indéfinie vers « SetPixelFormat@12 »

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:/SFML/lib/libsfml-window-s.a(WglContext.cpp.obj): bad reloc address 0x17 in section `.te
xt.unlikely'
collect2.exe: error: ld returned 1 exit status
After some research, I found was missing -lgdi32 and -lwinmm.


Finaly :
Quote
... -lroddgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-network-s -lsfml-audio-s -lsfml-system-s -lfreetype -ljpeg -lopengl32 -lflac -logg -lvorbis -lvorbisenc -lvorbisfile -lopenal32 -lpthread -lgdi32 -lwinmm -lboost_system-mgw48-s-1_55 -lboost_filesystem-mgw48-s-1_55 -lboost_thread-mgw48-mt-s-1_55 ... 
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x1ec): référence indéfinie vers « oggpack_writeinit »
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x204): référence indéfinie vers « oggpack_writeinit »
C:/SFML/lib/libvorbis.a(block.o):block.c:(.text+0x38b): référence indéfinie vers « oggpack_writeclear »

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:/SFML/lib/libvorbis.a(block.o): bad reloc address 0x20 in section `.eh_frame'
collect2.exe: error: ld returned 1 exit status

and i'm stuck :(



EDIT: Ah ! http://www.sfml-dev.org/tutorials/2.3/start-cb.php

Quote
Starting from SFML 2.2, when static linking, you will have to link all of SFML's dependencies to your project as well. This means that if you are linking sfml-window-s or sfml-window-s-d for example, you will also have to link opengl32, winmm and gdi32. Some of these dependency libraries might already be listed under "Inherited values", but adding them again yourself shouldn't cause any problems.

...

Module :
sfml-audio-s

Dependencies :
sfml-system-s
flac
ogg
vorbis
vorbisenc
vorbisfile
openal32

I have all dependencies for audio :D

and FAQ is not updated =D http://www.sfml-dev.org/faq.php#build-link-static

Thank you ! ^^
« Last Edit: May 18, 2015, 01:19:10 pm by Rodd »

Rodd

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • Email
Re: SFML 2.3 : New dependencies ?
« Reply #3 on: May 18, 2015, 01:49:03 pm »
Quote
-lsfml-graphics-s -lsfml-window-s -lsfml-network-s -lsfml-audio-s -lsfml-system-s -lfreetype -ljpeg -lopengl32 -lwinmm -lgdi32 -lopenal32 -lflac -lvorbisenc -lvorbisfile -lvorbis -logg -lpthread -lboost_system-mgw48-s-1_55 -lboost_filesystem-mgw48-s-1_55 -lboost_thread-mgw48-mt-s-1_55


Work ! Thank you !

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
Re: SFML 2.3 : New dependencies ?
« Reply #4 on: May 18, 2015, 04:13:10 pm »
the FAQ is not updated =D http://www.sfml-dev.org/faq.php#build-link-static
Forgot to merge binary1248's branch, it's now fixed.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything