SFML community forums
Help => Window => Topic started by: Kaphonaits 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. :(
-
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
-
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.
-
AFAIK, you can't use SFML with MinGW 4.4.
-
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...
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..
-
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.
-
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. :)
-
Here.
#include <SFML/Window.hpp>
using namespace sf;
int main()
{
Window App(VideoMode(800, 600, 32), "SFML Test");
while(App.IsOpened())
{
App.Display();
}
return 0;
}
-
And what if you use a working example (with at least an event loop so that the window can respond)?
-
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.
-
What does "nothing" mean?
-
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! ;)
-
Does it happen on ATI cards with recent drivers?
-
It happens on a HD 4650 M with recent drivers, too. A driver downgrade doesn't change anything.
# 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....
-
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.
-
I got something! Can anybody confirm this behavior:
When executing the code mentioned above, the command prompt opens, nothing happens AND after, well, 10 minutes the SFML-Window opens!!
And
OpenGL Warning: DrvShareLists: unsupported
Fail!
OpenGL Warning: DrvShareLists: unsupported
Is printed to the terminal...
Since I'm on a virtual machine, this may be different on other machines...
-
I think i´ve found something...
http://www.panda3d.org/forums/viewtopic.php?t=9791
As it says in the link i´ve provided:
Some graphics drivers don't provide a double-buffered offscreen context.
-
Ok but... there's no offscreen context in SFML, they are all attached to windows.
-
Hey,
I'm pretty sure that problem is 64-bit related. I get the same error (and I mean that when launching any sfml app) on two of my 64 bit machines where I don't have properly compiled 64-bit dlls and libs for SFML (it doesn't seem to work with the 32 bit libs), but not on my 32 bit machine.
(was posted here:
http://sfml-dev.org/forum/viewtopic.php?p=25747#25747