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

Author Topic: [Solved]Game window not working  (Read 11271 times)

0 Members and 2 Guests are viewing this topic.

The Illusionist Mirage

  • Full Member
  • ***
  • Posts: 115
  • My Life = Linux, C++ & Computers
    • View Profile
    • fleptic
    • Email
Re: Game window not working
« Reply #15 on: August 11, 2013, 06:32:43 pm »
Quote
@binary1248

No, it is a bit more involved than that. Look for a guide, it's too much to explain here.

I tried here: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks. But unfortunately still the same problem is persisting. I am in a fix cause thiugh the project is building, its not running.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Game window not working
« Reply #16 on: August 11, 2013, 08:56:57 pm »
Debugging doesn't mean building a debug version of your program. Debugging means doing things like setting breakpoints so that when you build and run the debug version, you can see what's going on at specific points in the code (and which ones it even gets to), step through the code one line at a time, check the call stack and the values of all your variables at each step, and so on.

Since the code is short, what you probably want to do to debug this problem is set a breakpoint on the first line of main, run a debug build, then step through the program one line at a time from there until you see what line is causing the problem.

lockandstrike

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Game window not working
« Reply #17 on: August 11, 2013, 10:34:54 pm »

Then, I created a new console app, went to its project build options and in the linker setting tab added these:
for debug,

sfml-graphics-d
sfml-system-d
sfml-window-d

for release,
sfml-graphics
sfml-system
sfml-window


The gcc toolchain requires that libs are declared in a certain order. Because of sfml-graphics lib depending on sfml-sytem and sfml-window try to add the libs in this order:

For debug:

sfml-system-d
sfml-window-d
sfml-graphics-d

For release:

sfml-system
sfml-window
sfml-graphics


And also i don't know how to do it in Code::Blocks but add the 'SFML_DYNAMIC' preprocessor to the project settings.

The Illusionist Mirage

  • Full Member
  • ***
  • Posts: 115
  • My Life = Linux, C++ & Computers
    • View Profile
    • fleptic
    • Email
Re: Game window not working
« Reply #18 on: August 12, 2013, 02:49:44 pm »
Quote
@ Ixrec

You said:
Debugging doesn't mean building a debug version of your program. Debugging means doing things like setting breakpoints so that when you build and run the debug version, you can see what's going on at specific points in the code (and which ones it even gets to), step through the code one line at a time, check the call stack and the values of all your variables at each step, and so on.


After  I did that I get this:




Quote
@ lockandstrike

The gcc toolchain requires that libs are declared in a certain order. Because of sfml-graphics lib depending on sfml-sytem and sfml-window try to add the libs in this order:

For debug:

sfml-system-d
sfml-window-d
sfml-graphics-d

For release:

sfml-system
sfml-window
sfml-graphics


Yes, I tried it but unfortunately no progress.

The Illusionist Mirage

  • Full Member
  • ***
  • Posts: 115
  • My Life = Linux, C++ & Computers
    • View Profile
    • fleptic
    • Email
Re: Game window not working
« Reply #19 on: August 12, 2013, 02:57:21 pm »
@ All those who tried to help me (zsbzsb, AlejandroCoria, Ixrec, eXpl0it3r, lockandstrike, binary1248, The Hatchet)

Thanks for trying to help me out guys. I've tried a lot but now I think all options have run out. I'll try to set up SFML with Code::Blocks some other time because I have little knowledge about my compiler, its possible that I've been messing with something that's going unnoticed, and I am pestering you guys ever since.

Right now I'll use VS 12 to learn and program using SFML 2.0 and after I am comletely familiar with Code::Blocks, I'll try to set up SFML in it.

THANKS :)

The Illusionist Mirage

  • Full Member
  • ***
  • Posts: 115
  • My Life = Linux, C++ & Computers
    • View Profile
    • fleptic
    • Email
[Solved] Game window not working
« Reply #20 on: August 14, 2013, 03:16:37 pm »
Hello Everyone!

I figured out what was wrong. Now I've successfully installed SFML 2.0 in Code::Blocks 12.11 using the MinGW 4.7.2!


:D  ;D ;)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [Solved]Game window not working
« Reply #21 on: August 14, 2013, 03:30:46 pm »
Glad you could resolve the issue.

Two tips for using the forum:
  • Use a normal font size and font weight, like the rest of the world. ;D
  • If you want to quote someone you can use [ quote=Name ] instead of using @ in the quote body.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Illusionist Mirage

  • Full Member
  • ***
  • Posts: 115
  • My Life = Linux, C++ & Computers
    • View Profile
    • fleptic
    • Email
Re: [Solved]Game window not working
« Reply #22 on: August 14, 2013, 04:07:15 pm »
Thanks Sir! I'll remember these two useful tips.

 

anything