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

Author Topic: CodeBlocks 12.11 SFML 2.0  (Read 19559 times)

0 Members and 1 Guest are viewing this topic.

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #15 on: February 23, 2013, 01:24:17 pm »
I followed the tutorial in the wiki by watching the video from SFMLCoder: . After trying it out several times I also write myself a batchscript. You can download it from www.joshua-behrens.de/index.php?page=post002. I can also post the log(log deleted due to no errors.
« Last Edit: July 12, 2013, 04:21:12 am by JoshuaBehrens »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: CodeBlocks 12.11 SFML 2.0
« Reply #16 on: February 23, 2013, 01:54:10 pm »
Seems like everything built fine, so where's the problem?
For logs, you should only.post the parts with errors, which I couldn't find any, or over looked them. And no there is no spoiler tag or similar.

Btw. you should only follow the official tutorials. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #17 on: February 23, 2013, 02:12:15 pm »
I think this tutorial http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php is not good, because when I download the RC there is no subdirectory called branches. I just retried it and recognised if both path you have to give are the same, then there are the settings that are also in the pictures. Now it generated the makefiles fine. I'll try to make and test it.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: CodeBlocks 12.11 SFML 2.0
« Reply #18 on: February 23, 2013, 02:15:28 pm »
I think this tutorial http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php is not good, because when I download the RC there is no subdirectory called branches.
It doesn't say there is.

Apart from that, I have yet to see good video tutorials for SFML on Youtube. I don't know this specific one, but I have seen a lot of people with partial knowledge, especially when it comes to writing code.
« Last Edit: February 23, 2013, 02:18:16 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #19 on: February 23, 2013, 02:31:31 pm »
In one of the images there are the two paths given for CMake and the first ist ./branches/sfml and the other ./build and they are both not in the archive whereas only the first must be given.

How far do I need to know how to code with SFML if it does not work (for me in Win 7)? I made a lot of (unfinished) things before with SFML on my XP netbook.

I must say at least it works with CMake to build this lib, but still giving the same error when linking.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: CodeBlocks 12.11 SFML 2.0
« Reply #20 on: February 23, 2013, 02:39:32 pm »
Ah, this is an old SVN version. But it doesn't matter, /branches/sfml2 is just the directory where you extract the SDK. Replace it with your own path.

Make sure you really don't have an old SFML version left or other things conflicting. Try to delete everything, download the SFML SDK and start again...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #21 on: February 23, 2013, 02:53:10 pm »
I try to install SFML 2(I never worked with <=1.6) on this machine for the first time and I'm always re-unpack the downloaded archive (from yesterday) to restart.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: CodeBlocks 12.11 SFML 2.0
« Reply #22 on: February 23, 2013, 03:02:47 pm »
It's not hard to build SFML with the latest snapshot directly from GitHub and following the official tutorial.
But you can also tale a look at my Nightly Builds. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #23 on: February 23, 2013, 03:52:38 pm »
That was a page that I should have found before. But I changed everything: I installed a mingw packet that your page uses, changed the toolchain to it, changed the compiler settings for the project, used the related libs that you compile (debug dynamic) and pressed recompile all. Still the same error undefined reference...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: CodeBlocks 12.11 SFML 2.0
« Reply #24 on: February 23, 2013, 03:56:03 pm »
Well then give some specific errors.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #25 on: February 23, 2013, 04:00:31 pm »
Everything the same the threadcreator posted (except the file path). I'm using his code, codeblocks 12.11, the mingw thats shipped with it(for testing your libs not) and that the VideoMode::ContexSettings are undefined referenced. I would also give you access via teamviewer to my machine to make it work :/ Or stream you what I do via skype or twitch.

Halsys

  • Jr. Member
  • **
  • Posts: 66
  • Halsys like Hal.sys
    • View Profile
    • Email
Re: CodeBlocks 12.11 SFML 2.0
« Reply #26 on: March 02, 2013, 10:27:59 am »
Looking at this post again, You got some issues still... Some of them I think can be fixed and I notice a couple things I do differently compared to you.
I will note the step I do to get SFML working and the differences we have so you can take note of that.

  • I Use the latest SVN Version of Code::Blocks http://forums.codeblocks.org/index.php/topic,17130.0.html(I find it better than 12.11)
  • I have the latest version of Mingw available in there installer noted as "Download latest repository catalogues"
  • Make SFML in CMake as a Codeblocks project and build it in Codeblocks
    Big note here though! I get a error too but its something very easy to fix and its basically consist of cc1.exe missing a couple dlls so I copied a bunch of DLL's from the /Mingw/Bin/ to fix this issue and put the DLL's in MinGW\libexec\gcc\mingw32\4.7.2... Which is where cc1.exe is and this fixes it.
  • Finally when its built you can finally use it in your project!
To actually build your project with SFML and manage different system builds like mac and linux.
I make 2 types for each kind of systems... Debug and Release!
For each one I include the SFML Libs and Include folders.
Also Quick bro tip! Move a copy of SFML to your Project folder so you don't have to navigate across your system to include it! Very helpful tip is Helpful!
And when your programming on those systems you have to rebuild SFML every time and include it but at least you don't have to make a new project of your project!

Side Note:Under Compiler settings you can use more cores to build projects! I have 8 cores on my computer and I think I broke the sound barrier of my computer.... Where it would take 3mins... it takes less than 30 seconds!

If this doesn't help, I can make a video of me making SFML and building a simple project from the tutorial page on the SFML page... Explaining everything in a greater context. Would that help?
If you notice I put "....", in my sentences way too much... I'm sorry.

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #27 on: March 02, 2013, 10:47:45 pm »
I just chose "Codeblocks MinGW", specified the c and c++ compiler and now I let it compile it with CB. It just took me 98 seconds. Maybe CB detects my cores automagically. But using the dll compiled via CB gives the same error. In my other project. For making it simple for me to use a external library I have a second folder for all the external libraries I download or test or whatelse and have it in the search directories for the compiler itself. I would be thankful for a video and thanks for the hint where the dlls are for cc1.exe, helped me a lot.
I see no reason why to put SFML in my projects directly.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: CodeBlocks 12.11 SFML 2.0
« Reply #28 on: March 03, 2013, 01:17:14 am »
Well I didn't have a usable microphone at my disposal, so you'll have to go with the really crappy sound. ::)

I also forgot to show the part, where you add the compiler to the settings.
Go to Settings->Compiler...->Toolchain executables and add the path to MinGW there.



It's really quick and dirty, but it might give you an insight, at least that's what I'm hoping. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JoshuaBehrens

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: CodeBlocks 12.11 SFML 2.0
« Reply #29 on: March 03, 2013, 02:42:24 am »
Well thank you exploiter,

at first I was quite confused that you have a German localization but you are speaking a quite good English to me so I wouldnt had identified you as a German-speaking person. I didn't anything different to you BUT I downloaded the 2.0RC from the downloadpage from sfml-dev.org and not from github and with the Codeblocks-project I testet the target "All" and the compiled binaries with my projects. Thanks for the video to show me the missing points. The release builds are working, but not the debug build. I tested with the code of the threadcreator. In debug target it's starting and throws a sigsev because window is 0 following the call stack:
#06E182A92sf::Window::Window(this=0x0)(C:\Users\User\Downloads\SFML-master\SFML-master\src\SFML\Window\Window.cpp:47)
#168ED61D1sf::RenderWindow::RenderWindow(this=0x0, mode=..., title=..., style=2686732, settings=...)(C:\Users\User\Downloads\SFML-master\SFML-master\src\SFML\Graphics\RenderWindow.cpp:42)
 
#2004014DFmain()(C:\Users\User\CBP\Test\main.cpp:5)
And looking at the comments in the code makes it clear why it is 0 but how to fix this without using the obvious one(adding the call to the base class constructor) because it is not advised?
#1:
/*44*/Window::Window() :
/*45*/m_impl          (NULL),
/*46*/m_context       (NULL),
/*47*/m_frameTimeLimit(Time::Zero)
/*48*/{
/*49*/
/*50*/}
#2:
/*42*/RenderWindow::RenderWindow(VideoMode mode, const String& title, Uint32 style, const ContextSettings& settings)
/*43*/{
/*44*/    // Don't call the base class constructor because it contains virtual function calls
/*45*/    create(mode, title, style, settings);
/*46*/}

 

anything