1
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
...
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
...