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

Author Topic: I just do not know what to do!  (Read 9212 times)

0 Members and 1 Guest are viewing this topic.

Kaphonaits

  • Newbie
  • *
  • Posts: 21
    • View Profile
I just do not know what to do!
« on: December 25, 2010, 06:46:06 am »
Hi. I've been trying to get SFML to work with Code::Blocks and the provided gcc 4.4 MinGW compiler. SFML-System, as the Randomizer works.

The problem comes with using any form of SFML-Window. As what happens is if (in Code::Blocks) I set the kind of application to Console Application, I get a normal blank command prompt window. It won't respond to any styles. So if I put in Styles::Fullscreen, nothing happens. Just the normal blank command prompt window.

If I set it to a GUI Application like it is supposed to be, nothing appears on screen and I have to manually end the process with the Task Manager.

I've tried reinstalling Code::Blocks. I've tried reinstalling SFML.

I've tried linking the libraries dynamically.

No dice.

Please help me. I'm really sick of using SDL for my programs and would like to switch to SFML, but as you can see I probably won't be able to for now. :(
The keyboard is mightier than the sword.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: I just do not know what to do!
« Reply #1 on: December 25, 2010, 09:37:28 am »
Quote from: "Kaphonaits"
So if I put in Styles::Fullscreen
What do you mean ?

The only thing in C::B you may do is set your app as «GUI» and not «Command Prompt» (or somethign like that – the default one if I remember) if you don't want that black thing. Everything else in SFML is not related at all with C::B (or any other IDE).

Follow the tutorials to get an idea of how you should use SFML.  :wink:

EDIT : typo
SFML / OS X developer

Kaphonaits

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: I just do not know what to do!
« Reply #2 on: December 26, 2010, 08:22:46 am »
Quote from: "Hiura"
Quote from: "Kaphonaits"
So if I put in Styles::Fullscreen
What do you mean ?

The only thing in C::B you may do is set your app as «GUI» and not «Command Prompt» (or somethign like that – the default one if I remember) if you don't want that black thing. Everything else in SFML is not related at all this C::B (or any other IDE).

Follow the tutorials to get an idea of how you should use SFML.  :wink:
Your answer made little to no sense to me.

What I got out of it: To set my app in C::B to GUI (i've done this) and I think you're suggesting that Code::Blocks is the problem and not SFML.

Perhaps you're right, but I refuse to use any other IDE, especially Visual C++ 2010 due to it's god-awful compiler.
The keyboard is mightier than the sword.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
I just do not know what to do!
« Reply #3 on: December 26, 2010, 08:54:16 am »
AFAIK, you can't use SFML with MinGW 4.4.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: I just do not know what to do!
« Reply #4 on: December 26, 2010, 11:27:22 am »
Quote from: "Kaphonaits"
What I got out of it: To set my app in C::B to GUI (i've done this) and I think you're suggesting that Code::Blocks is the problem and not SFML.
I didn't say that...

Quote from: "Hiura"
Quote from: "Kaphonaits"
So if I put in Styles::Fullscreen
What do you mean ?
without code I can't understand what you've done.

Is there any error/warning/... at any time during the process compiling/executing ?

BTW, there was a typo in my last message, make more sense now..
SFML / OS X developer

Kaphonaits

  • Newbie
  • *
  • Posts: 21
    • View Profile
I just do not know what to do!
« Reply #5 on: December 28, 2010, 03:12:56 am »
Quote from: "tntexplosivesltd"
AFAIK, you can't use SFML with MinGW 4.4.
This doesn't make sense. The tutorials themselves provide MinGW with gcc 4.4 so you CAN use it.

I'll try with C::B's default MinGW, version 3.45(?) and see if it works. But I doubt it.
The keyboard is mightier than the sword.

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
I just do not know what to do!
« Reply #6 on: December 28, 2010, 03:32:11 am »
Dude, you're not doing yourself any favors by ignoring Hiura. He may not be a native English speaker, but he is definitely one of the more experienced SFML users in here.

Please help us help you, by providing a minimal and complete code that reproduces your problem. :)

Kaphonaits

  • Newbie
  • *
  • Posts: 21
    • View Profile
I just do not know what to do!
« Reply #7 on: December 28, 2010, 04:24:02 am »
Here.

Code: [Select]
#include <SFML/Window.hpp>

using namespace sf;

int main()
{
      Window App(VideoMode(800, 600, 32), "SFML Test");
      while(App.IsOpened())
      {
            App.Display();
      }
      return 0;
}
The keyboard is mightier than the sword.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
I just do not know what to do!
« Reply #8 on: December 28, 2010, 08:00:45 am »
And what if you use a working example (with at least an event loop so that the window can respond)?
Laurent Gomila - SFML developer

Kaphonaits

  • Newbie
  • *
  • Posts: 21
    • View Profile
I just do not know what to do!
« Reply #9 on: December 29, 2010, 09:57:58 am »
Quote from: "Laurent"
And what if you use a working example (with at least an event loop so that the window can respond)?
Yes I just tried this.

Result: Nothing.
The keyboard is mightier than the sword.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
I just do not know what to do!
« Reply #10 on: December 29, 2010, 09:58:58 am »
What does "nothing" mean?
Laurent Gomila - SFML developer

MarsCoreTeam

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://www.marsshooter.org
Very odd...
« Reply #11 on: January 03, 2011, 03:02:08 pm »
I can confirm this... well... bug? (I'm using SFML2!)
When making use of sf::Window, on some Windows (7?) machines nothing happens. Really nothing, it describes it at its best! A command prompt opens with a blinking mark. There are some users of our game M.A.R.S., who reported this problem too (for example heishe: http://www.sfml-dev.org/forum/viewtopic.php?p=25153#25153). Recently I installed Windows7 in on virtual machine and: I have the problem too. I didn't get to make it open any sf::Window. (Tried to compile the examples)

The problem is definitively not code-related, but machine-related. The same code works on some machines whereas it does not on others...

If you have any questions I will answer them... I really want this odd problem to be solved! ;)
Working on the Open Source Project M.A.R.S.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
I just do not know what to do!
« Reply #12 on: January 03, 2011, 07:05:24 pm »
Does it happen on ATI cards with recent drivers?
Laurent Gomila - SFML developer

MarsCoreTeam

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://www.marsshooter.org
I just do not know what to do!
« Reply #13 on: January 04, 2011, 01:02:30 pm »
It happens on a HD 4650 M with recent drivers, too. A driver downgrade doesn't change anything.
Code: [Select]

# include <SFML/Graphics.hpp>
# include <SFML/Window.hpp>
# include <iostream>

int main() {
    std::cout << "Fail!" << std::endl;

    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Shapes");

    while (App.IsOpened()) {
        sf::Event Event;
        while (App.GetEvent(Event)) {
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        App.Clear();
        App.Display();
    }
    return EXIT_SUCCESS;
}


Doesn't cout anything....
Working on the Open Source Project M.A.R.S.

Crank1d

  • Newbie
  • *
  • Posts: 14
    • View Profile
I just do not know what to do!
« Reply #14 on: January 04, 2011, 02:44:41 pm »
I have Windows 7 64-bit and it seems like I´m having the same problem (also tried with older SFML versions 1.5 & 1.6 and nothing works). I have also tried running precompiled samples and they also wont work.

 

anything