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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - paulochon

Pages: [1]
1
General / Re: SFML firt exemple static compilation
« on: December 31, 2014, 04:53:10 am »
Yep u right, its a wrap up but its more a help for Dev-Cpp guys since the tut provided led me to errors.
I followed the tut on code:blocks but at first i just put the 3 lib (graphic, window, system) and thought it was enough. then I added the missing lib (jpeg, freetype. etc...) but got still errors due to the fact that the tut was giving glew , instead of glew32 and also i was putting those extra lib before the sfml-xxx libs instead of after them. So before reaching the right config i got errors and was trying different combinations, that the purpose of my post , to provide the right config for the guys in the same situation.

Cheers

2
General / SFML firt exemple static compilation
« on: December 31, 2014, 04:33:30 am »
Hi
Just to bring my 5 penny to the pot...
I just installed SFML and was trying a static compilation (Using Dev-Cpp and 64 bits versions) of the exemple provided in the tut.

i first get into troubles with linkage errors like
D:\SFML-2.2-gcc481-64bit\lib\libsfml-window-s.a(Window.cpp.obj)   Window.cpp:(.text+0x16d): undefined reference to `sf::Clock::Clock()'
........................
or
D:\SFML-2.2-gcc481-64bit\lib\libsfml-graphics-s.a(RenderWindow.cpp.obj)   RenderWindow.cpp:
(.text+0x385): undefined reference to `glReadPixels'
...................................

After googling on the web ,
- i realized that the importance of the order of lib declaration
- Also i made a mistake using glew instead of glew32

After various trial and error , i finally ended with the right config that could help others
so in the section parameters / Linker section, i added
-lsfml-graphics-s
-lsfml-window-s
-lsfml-system-s
-ljpeg
-lglew32
-lfreetype
-lgdi32
-lopengl32
-lwinmm

in the parameters / C++:
-DSFML_STATIC

and of course, in directories/library dirtectories:
D:\SFML-2.2-gcc481-64bit\lib

and include/library dirtectories:
D:\SFML-2.2-gcc481-64bit\include


everything worked perfectly after that
Hope it ll help

Cheers

Nota: Dont know why Dev-cpp uses this kind of declaration , instead of just
sfml-graphics-s
sfml-window-s
sfml-system-s
jpeg
...

Pages: [1]