SFML community forums
Help => General => Topic started by: mimipim on March 20, 2011, 07:15:16 pm
-
Hi. When i download sfml2 theres no lib folder.
How to setup sfml2 to work with C::B?
-
You must compile it, there's no release yet.
-
Can you explane me how to do this?
-
There's one tutorial for SFML 2 on the website, and guess what, it's explained inside ;)
-
Okay. I try to do what is explained in tutorial but I can't understand where is this PATH=%PATH%;.........
When I try to build it with cmake I get errors:
(http://store.picbg.net/pubpic/A4/85/f02f4dab2879a485.png)
I hope someone help me to build SFML2 :?
-
I can't understand where is this PATH=%PATH%;.........
You must type these commands in a command prompt.
(http://www.bleepstatic.com/tutorials/cmdprompt/cmdprompt.gif)
And please use smaller screenshots, not everybody has a wide screen ;)
-
Okay. I do this.. maybe have a progress but still give errors(with CmakeList):
(http://store.picbg.net/pubpic/C2/40/bddb761a46cec240.png)
-
You must run the top-level CMakeLists.txt, not the one in src/SFML.
-
Okay I generate it(lib folder is empty).
Next step is to run mingw32-make but I don't understand what arguments exactly to put?
-
It's clearly explained in the tutorial
Here are all the targets that are available, depending on the configure options that you chose:
* all
This is the default target, it is used if no target is explicitely specified. It builds all the targets that produce a binary (sfml libraries and examples).
* sfml-system, sfml-window, sfml-network, sfml-graphics, sfml-audio, sfml-main
Builds the corresponding SFML library. The "sfml-main" target is available only on Windows systems.
* ftp, opengl, pong, shader, sockets, sound, sound-capture, voip, window, win32, X11
Builds the corresponding SFML example. These targets are available only if the BUILD_EXAMPLES option is enabled. Note that some of the targets are available only on a certain OS ("win32" is available on Windows, "X11" on Linux, etc.).
* doc
Generates the API documentation. This target is available only if the BUILD_DOC option is enabled.
* clean
Removes all the object files produced by a previous compilation. You generally don't need to invoke this target, except when you want to recompile SFML completely (some updates may mess up with object files already compiled, and cleaning everything is the only solution).
* install
Installs SFML to the path defined in the CMAKE_INSTALL_PREFIX option. It copies the SFML libraries and headers, as well as examples and documentation if the BUILD_EXAMPLES and BUILD_DOC options are enabled. After installing, you get a clean distribution of SFML, just as if you had downloaded the SDK or installed it from the system repositories.
The most important one is the first:
* all
This is the default target, it is used if no target is explicitely specified.
So:
mingw32-make
... is all you need to type to compile SFML. Optionally followed by a "mingw32-make install" if you want a clean install (and have set the CMAKE_INSTALL_PREFIX variable to something relevant).
-
I already try this:
(http://store.picbg.net/pubpic/49/47/3c9525c6528d4947.png)
Maybe im missing something :?
-
You must do it from the directory where the makefiles were generated... mingw-make won't find anything to process in C:\ ;)
-
Thanks for your help Laurent. (I hope this topic will be useful for other members).
I got it now. :lol:
-
Oooh.. god :?
I hate these errors:
Release\Engine.o:Engine.cpp:(.text+0x19d5): undefined reference to `_imp___ZN2sf5ImageD1Ev'
Release\Engine.o:Engine.cpp:(.text+0x1a79): undefined reference to `_imp___ZTVN2sf6SpriteE'
Release\Engine.o:Engine.cpp:(.text+0x1aad): undefined reference to `_imp___ZN2sf8DrawableD2Ev'
Release\Engine.o:Engine.cpp:(.text+0x1abc): undefined reference to `_imp___ZN2sf5ImageD1Ev'
Release\Engine.o:Engine.cpp:(.text+0x1bb8): undefined reference to `_imp___ZN2sf5ImageD1Ev'
(theres more)
I think this mean that something is not linked or... ?!
What I do after Build SFML2:
C::B Compiler and Debuger settings->
Search Directories->
Compiler: C:\CPP\SFML2\include,
Linker: C:\CPP\SFML2\lib;
Project->
Build options->
Release->
Linker settings->
Other linker options:
-lsfml-graphics-s
-lsfml-window-s
-lsfml-audio-s
-lsfml-system-s
-lsfml-network-s
Ideas?
-
You must add SFML_STATIC to your preprocessor options.
-
You must add SFML_STATIC to your preprocessor options.
Did you mean to add SFML_STATIC to my Global Compiler settings(compiler settings) #defines textarea?
I try it but theres no change :?
-
Did you mean to add SFML_STATIC to my Global Compiler settings(compiler settings) #defines textarea?
Should be there, yes. Make sure that it is defined for the configuration that you use (Debug/Release).
-
Hmmm. I'm sure I check it a lot of times and I have only release because I remove debug. :roll:
-
The problem was something with .o files. I delete all of them and build my project again - that result to success :wink:
(this .o files was created with SFML 1.6 maybe that was the problem)