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

Author Topic: RenderWindow causes compiler failure  (Read 1558 times)

0 Members and 1 Guest are viewing this topic.

daz

  • Newbie
  • *
  • Posts: 5
    • View Profile
RenderWindow causes compiler failure
« on: September 02, 2010, 07:21:01 pm »
The error:
Code: [Select]

-------------- Build: Release in quickie ---------------

Linking console executable: bin\Release\quickie.exe
d:/gcc4-4/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: d:/gcc4-4/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../libsfml-window-s-d.a(dmms00244.o): illegal symbol index 419430452 in relocs
collect2: ld returned 1 exit status


Full source:
Code: [Select]

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

using namespace std;

int main()
{
    /*sf::Image Image;
    sf::Sprite Sprite;
    if (!Image.LoadFromFile("sprite.png"))
    {
        // Error...
    }
    Sprite.SetImage(Image);*/
    cout << "Hello world!" << endl;
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Window");
    bool Running = true;
    while (App.IsOpened())
    {
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Process event
            // Window closed
            if (Event.Type == sf::Event::Closed)
                App.Close();

            // Escape key pressed
            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();
        }
        App.Clear();
        //App.Draw(Sprite);
        App.Display();
    }
    App.Close();
    return 0;
}


If I replace "sf::RenderWindow" with "sf::Window" (and the renderwindow-specific app.clear) it compiles happily.

Notably, I'm using Windows and statically linking.[/code]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
RenderWindow causes compiler failure
« Reply #1 on: September 02, 2010, 08:01:47 pm »
Which version of SFML?
Laurent Gomila - SFML developer

daz

  • Newbie
  • *
  • Posts: 5
    • View Profile
RenderWindow causes compiler failure
« Reply #2 on: September 02, 2010, 08:20:52 pm »
Quote from: "Laurent"
Which version of SFML?

1.6 (I guess I shouldn't have assumed people can read minds)

Also, this is win7 64 bit if that's believed to have any significant difference.

 

anything