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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - daz

Pages: [1]
1
Graphics / RenderWindow causes compiler failure
« 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.

2
Graphics / 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]

3
General / Statically Linking Issues [not quite resolved]
« on: May 26, 2010, 03:55:19 pm »
Quote from: "Laurent"
Do you use gcc 4.4, as said at the beginning of the tutorial?

Yes, I downloaded it from the link mentioned at the beginning of the tutorial (http://sfml-dev.org/tutorials/mingw-with-gcc-4.4.zip)

4
General / Statically Linking Issues [not quite resolved]
« on: May 26, 2010, 07:09:58 am »
Well, after downloading the specific version of MingW and changing c::b to use the compiler, this remains for me:

Code: [Select]

obj\Release\main.o:main.cpp:(.text+0x3f)||undefined reference to `__gxx_personality_sj0'|
obj\Release\main.o:main.cpp:(.text+0x53)||undefined reference to `_Unwind_SjLj_Register'|
obj\Release\main.o:main.cpp:(.text+0x180)||undefined reference to `_Unwind_SjLj_Unregister'|
obj\Release\main.o:main.cpp:(.text+0x1e5)||undefined reference to `_Unwind_SjLj_Resume'|
obj\Release\main.o:main.cpp:(.text+0x234)||undefined reference to `_Unwind_SjLj_Resume'|
||=== Build finished: 5 errors, 0 warnings ===|


Better than 49 errors, I suppose...

5
General / Statically Linking Issues [not quite resolved]
« on: May 26, 2010, 05:41:40 am »
I believe I followed the tutorial over here accurately (c::b, windows): http://sfml-dev.org/tutorials/1.6/start-cb.php
Global compiler options set, project build settings set (with -s on the end of them), build mode set to release... but when I try to compile, it spews out a lot of stuff at me:
Code: [Select]

D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x799)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x7f9)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x8e8)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x91c)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x9a0)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x9e4)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xaaa)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xb52)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xbfa)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0xece)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.text+0x115e)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Window.o):Window.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(VideoMode.o):VideoMode.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x625)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x686)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x6c3)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x94f)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.text+0x97b)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImpl.o):WindowImpl.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(Context.o):Context.cpp:(.text+0x108)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(Context.o):Context.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(VideoModeSupport.o):VideoModeSupport.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x4e7)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0xd08)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x121e)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1346)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x146e)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1584)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x15cc)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1760)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x17a3)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x17d0)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x17d8)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x197c)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1c24)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1c5e)||undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1d02)||undefined reference to `std::ostream& std::ostream::_M_insert<unsigned long>(unsigned long)'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1dd0)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x1e0d)||undefined reference to `std::ctype<char>::_M_widen_init() const'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x225c)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x2624)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x273a)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x2852)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.text+0x2a92)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-window-s.a(WindowImplWin32.o):WindowImplWin32.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-window-s.a(Joystick.o):Joystick.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-system-s.a(Clock.o):Clock.cpp:(.eh_frame+0x11)||undefined reference to `__gxx_personality_v0'|
D:\SFML-1.6\lib\libsfml-system-s.a(Platform.o):Platform.cpp:(.text+0xca)||undefined reference to `_Unwind_Resume'|
D:\SFML-1.6\lib\libsfml-system-s.a(Platform.o):Platform.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
||=== Build finished: 49 errors, 0 warnings ===|


My source is simply:
Code: [Select]

#include <SFML/Window.hpp>
int main()
{
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
    bool running = true;
    while(running) {
        App.Display();
    }
    return EXIT_SUCCESS;
}

Starting as a CMD line project...


I found another topic, and it appears this is likely the cause of incompatible gcc versions. Yay!

Pages: [1]
anything