SFML community forums
Help => Network => Topic started by: hacky on May 19, 2009, 07:53:16 pm
-
when im using a renderwindow
RenderWindow App;
& adding
Ftp server;
i also get an runtime error =/
separately all work fine
-
Hi
Please show us a minimal example that reproduces the problem,
and give informations about your configuration / OS / SFML version / etc.
-
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
using namespace std;
using namespace sf;
Ftp Server;
RenderWindow App;
int main()
{
App.Create(VideoMode(800, 600, 32), "SFML Window");
App.SetFramerateLimit(60);
while (App.IsOpened())
{
Event Event;
while (App.GetEvent(Event))
{
// Window closed
if (Event.Type == Event::Closed)
App.Close();
// Escape key pressed
if ((Event.Type == Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();
}
App.Display();
}
return EXIT_SUCCESS;
}
windows vista sfml 1.4
adding the "Ftp Server;" makes the runtime error but when i do it in a console application it works fine =/
-
Event Event;
One of the main reasons NOT to import namespaces...
-
Event Event;
One of the main reasons NOT to import namespaces...
well that doesnt solve my problem
-
You didn't answer my second question
configuration / OS / SFML version
And what does the error message say exactly?
Are you sure you're not mixing debug and release configurations?
-
codeblocks with this linker options:
-lsfml-graphics
-lsfml-window
-lsfml-system
-lsfml-network
and now i tried this..
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
using namespace std;
using namespace sf;
RenderWindow App;
Ftp server;
int main()
{
return EXIT_SUCCESS;
}
adding the Ftp server also makes an runtime error here =/
(http://img3.imagebanana.com/img/7w9va4zw/error.jpg)
-
codeblocks with this linker options:
-lsfml-graphics
-lsfml-window
-lsfml-system
-lsfml-network
In debug mode it should be
-lsfml-graphics-d
-lsfml-window-d
-lsfml-system-d
-lsfml-network-d
-
the error still comes =/
-
Take care of ordering:
-lsfml-system-d
-lsfml-window-d
-lsfml-graphics-d
-lsfml-network-d
-
still no changes =(((
-
well i splitted the ftp part in an extra programm ..it works fine but thats not the best solution =/
-
Maybe you can put it in a try/catch block, the error looks like an uncaught exception.
If it's not the case, you can try using a debugger to get more informations about the error.