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

Author Topic: ftp & renderwindow?  (Read 7410 times)

0 Members and 1 Guest are viewing this topic.

hacky

  • Newbie
  • *
  • Posts: 26
    • View Profile
ftp & renderwindow?
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
ftp & renderwindow?
« Reply #1 on: May 19, 2009, 08:04:17 pm »
Hi

Please show us a minimal example that reproduces the problem,
and give informations about your configuration / OS / SFML version / etc.
Laurent Gomila - SFML developer

hacky

  • Newbie
  • *
  • Posts: 26
    • View Profile
ftp & renderwindow?
« Reply #2 on: May 19, 2009, 08:13:05 pm »
Code: [Select]
#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 =/

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
ftp & renderwindow?
« Reply #3 on: May 19, 2009, 08:34:16 pm »
Code: [Select]
Event Event;
One of the main reasons NOT to import namespaces...

hacky

  • Newbie
  • *
  • Posts: 26
    • View Profile
ftp & renderwindow?
« Reply #4 on: May 19, 2009, 08:36:38 pm »
Quote from: "Tank"
Code: [Select]
Event Event;
One of the main reasons NOT to import namespaces...


well that doesnt solve my problem

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
ftp & renderwindow?
« Reply #5 on: May 20, 2009, 11:04:48 am »
You didn't answer my second question
Quote
configuration / OS / SFML version

And what does the error message say exactly?

Are you sure you're not mixing debug and release configurations?
Laurent Gomila - SFML developer

hacky

  • Newbie
  • *
  • Posts: 26
    • View Profile
ftp & renderwindow?
« Reply #6 on: May 20, 2009, 12:34:17 pm »
codeblocks with this linker options:
-lsfml-graphics
-lsfml-window
-lsfml-system
-lsfml-network

and now i tried this..
Code: [Select]
#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 =/


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
ftp & renderwindow?
« Reply #7 on: May 20, 2009, 12:36:25 pm »
Quote
codeblocks with this linker options:
-lsfml-graphics
-lsfml-window
-lsfml-system
-lsfml-network

In debug mode it should be
Quote
-lsfml-graphics-d
-lsfml-window-d
-lsfml-system-d
-lsfml-network-d
Laurent Gomila - SFML developer

hacky

  • Newbie
  • *
  • Posts: 26
    • View Profile
ftp & renderwindow?
« Reply #8 on: May 20, 2009, 12:40:02 pm »
the error still comes =/

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
ftp & renderwindow?
« Reply #9 on: May 20, 2009, 02:22:10 pm »
Take care of ordering:
Code: [Select]

-lsfml-system-d
-lsfml-window-d
-lsfml-graphics-d
-lsfml-network-d

hacky

  • Newbie
  • *
  • Posts: 26
    • View Profile
ftp & renderwindow?
« Reply #10 on: May 20, 2009, 02:30:35 pm »
still no changes =(((

hacky

  • Newbie
  • *
  • Posts: 26
    • View Profile
ftp & renderwindow?
« Reply #11 on: May 20, 2009, 10:02:47 pm »
well i splitted the ftp part in an extra programm ..it works fine but thats not the best solution =/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
ftp & renderwindow?
« Reply #12 on: May 20, 2009, 10:46:24 pm »
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.
Laurent Gomila - SFML developer