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

Author Topic: Integrating Qt 5.4 with SFML 2.0  (Read 8576 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Integrating Qt 5.4 with SFML 2.0
« Reply #15 on: March 14, 2015, 07:30:25 pm »
Forcing a rebuild is usually the last chance solution, when you're out of ideas, so that was half a joke, and half a last desperate attempt to help you ;)

Your event loop is weird and could explain your problem. Just do a regular while loop like in every example that you can find.
Laurent Gomila - SFML developer

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Integrating Qt 5.4 with SFML 2.0
« Reply #16 on: March 14, 2015, 07:53:07 pm »
Quote
Your event loop is weird and could explain your problem.

It's more than weird, it's logically flawed since it always assumes the first event it receives per frame is a valid event even though the documentation clearly state you can not access event members unless pollEvent(...) returns true. And you break that rule.
« Last Edit: March 15, 2015, 04:25:51 am by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

WDR

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Integrating Qt 5.4 with SFML 2.0
« Reply #17 on: March 14, 2015, 08:51:36 pm »
Well, the event loop was a solution to some problem I was having quite some time ago. I can't remember what it was, but the general gist of it was that it was skipping the first event or something and responding only in the second event. I posted this problem in Stack Overflow, I think, (Before you deride me for this, I didn't know SFML forums existed then) and this solution was suggested to me. After I tried it, it worked so I continued using it.

Irrespective of that, however, I am still not getting my window either way (I changed the event loop). I don't know why.

It compiles and executes fine displaying only the console window. Here's the compile output,

01:15:57: Running steps for project untitled...
01:15:57: Configuration unchanged, skipping qmake step.
01:15:57: Starting: "C:\Qt\Tools\QtCreator\bin\jom.exe"
        C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
01:15:57: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited normally.
01:15:57: Elapsed time: 00:00.

And the application output,

Starting C:\Users\WDR\Documents\Qt\untitled\debug\untitled.exe...
C:\Users\WDR\Documents\Qt\untitled\debug\untitled.exe exited with code -1073741515

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Integrating Qt 5.4 with SFML 2.0
« Reply #18 on: March 15, 2015, 04:29:24 am »
Maybe step through your code and see what it is doing? At the least add some cout statements to see how far it gets.

Quote
untitled.exe exited with code -1073741515

With a return code like that it would seem as if an error is occurring.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

WDR

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Integrating Qt 5.4 with SFML 2.0
« Reply #19 on: March 15, 2015, 07:04:55 am »
Yeah, I thought so too... Because, though I don't know much about debugging, even I know it's supposed to return a zero on success.

Anyways, I fixed it. It works perfectly now. You guys wanna know the stupidity behind it? Go on, take a guess, take a guess!

Oh, you know what? Never mind! I'll tell you. I forgot to add the SFML binaries to the Build Environment's Path Variable. I know, right? -_-

Well, If you guys are laughing at me, don't worry about it, I'm already doing it for you. Sometimes, you gotta do that. Anyways, nevertheless... Thank you guys all very much for all your help. I really appreciate it.  :)

 

anything