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

Author Topic: Can't figure out - SFML 2.0 - MinGW( Code::Blocks)  (Read 2447 times)

0 Members and 1 Guest are viewing this topic.

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Can't figure out - SFML 2.0 - MinGW( Code::Blocks)
« on: October 06, 2012, 07:57:09 am »
Hello guys. For some hours I try to set SFML 2.0 for Code::Blocks( MinGW) and can't. Here is what I tried:
1.I used the files from download directly and setted the Code::Blocks fom tutorial and used the example from tutorial to test if work.
Erros:
ld.exe||cannot find -lsfml-graphics|
||=== Build finished: 1 errors, 0 warnings ===|

2.Tried with the tutorial to recompile it using CMake. I recompiled without errors and setted in the Code::Blocks the new dir. Same example used.
Errors:
D:\C++ Work\Test\Untitled3.cpp|1|error: SFML/Graphics.hpp: No such file or directory|
D:\C++ Work\Test\Untitled3.cpp||In function 'int main()':|
D:\C++ Work\Test\Untitled3.cpp|5|error: 'sf' has not been declared|
D:\C++ Work\Test\Untitled3.cpp|5|error: expected ';' before 'window'|
D:\C++ Work\Test\Untitled3.cpp|6|error: 'sf' has not been declared|
D:\C++ Work\Test\Untitled3.cpp|6|error: expected ';' before 'shape'|
D:\C++ Work\Test\Untitled3.cpp|7|error: 'shape' was not declared in this scope|
D:\C++ Work\Test\Untitled3.cpp|7|error: 'sf' has not been declared|
D:\C++ Work\Test\Untitled3.cpp|9|error: 'window' was not declared in this scope|
D:\C++ Work\Test\Untitled3.cpp|11|error: 'sf' has not been declared|
D:\C++ Work\Test\Untitled3.cpp|11|error: expected ';' before 'event'|
D:\C++ Work\Test\Untitled3.cpp|12|error: 'event' was not declared in this scope|
D:\C++ Work\Test\Untitled3.cpp|14|error: 'sf' has not been declared|
||=== Build finished: 12 errors, 0 warnings ===|

3.And in a final I copied the include folder in the recompiled folder and give me the same errors as in point 1.

I using this file for SFML 2.0 LaurentGomila-SFML-2.0-rc-94-g26fa99f.tar ( posted if in case someone want the version)

Please if can someone help me or to figure out using TeamViewer. :(

P.S.: Sorry for my bad english.
« Last Edit: October 06, 2012, 08:19:20 am by AlexxanderX »
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't figure out - SFML 2.0 - MinGW( Code::Blocks)
« Reply #1 on: October 06, 2012, 08:57:39 am »
Quote
cannot find -lsfml-graphics
It means that your linker search paths are incorrect. Make sure that libsfml-graphics.a exists in the path that you gave to your linker.
Laurent Gomila - SFML developer

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: Can't figure out - SFML 2.0 - MinGW( Code::Blocks)
« Reply #2 on: October 06, 2012, 10:03:17 am »
I followed this tutorial: and after this http://sfmlcoder.wordpress.com/2011/05/18/creating-a-first-sfml-project/ and is worked with the exemple code from tutorial http://www.sfml-dev.org/tutorials/2.0/start-cb.php. Thanks for trying to help Laurent. In finally I can start programming.  ;D
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can't figure out - SFML 2.0 - MinGW( Code::Blocks)
« Reply #3 on: October 06, 2012, 10:25:08 am »
Don't follow outdated/unofficial tutorials for SFML 2, things can change quickly until the final version is released.

Following the official tutorials step by step should be enough to get a working program.
Laurent Gomila - SFML developer

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: Can't figure out - SFML 2.0 - MinGW( Code::Blocks)
« Reply #4 on: October 06, 2012, 11:02:56 am »
I know that but the video is not really updated and helped me a lot( why? because I don't understand very good english).

Exist tutorials who start from 0 knowlege and to learn the base of programming with SFML? I know exists category tutorials but I don't understand very good all what is in a tutorial from there.
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/