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

Author Topic: Issues Building with MinGW  (Read 2761 times)

0 Members and 1 Guest are viewing this topic.

Nyrus

  • Newbie
  • *
  • Posts: 7
    • View Profile
Issues Building with MinGW
« on: December 10, 2011, 05:08:25 pm »
Hello, I've been using SFML for a while and it works great when I build my program for linux on Ubuntu. Though when I try to build it for windows I run into a bit of difficulty.

When compiling the code from the window tutorial,

Code: [Select]
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}


using the command:
Code: [Select]
i586-mingw32msvc-gcc -o test test.cpp -mwindows -lstdc++ -lopengl32 -lglu32 -lsfml-window -lsfml-system
when I run it in wine I get a bunch of errors like:
Code: [Select]

err:module:import_dll Library libgcc_s_dw2-1.dll (which is needed by L"Z:\\home\\Test\\sfml-system.dll") not found
err:module:import_dll Library sfml-system.dll (which is needed by L"Z:\\home\\Test\\sfml-window.dll") not found
err:module:import_dll Library libgcc_s_dw2-1.dll (which is needed by L"Z:\\home\\Test\\sfml-window.dll") not found
err:module:import_dll Library sfml-window.dll (which is needed by L"Z:\\home\\Test\\test") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\Test\\test" failed, status c0000135


So apparently I'm missing "libgcc_s_dw2-1.dll". I've searched all directories of my computer and it was not found.
I tried installing codeblocks with MinGW and compiling it with that instead and got the same result. What should I do to fix this? What am I doing wrong?

guigui78

  • Newbie
  • *
  • Posts: 1
    • AOL Instant Messenger - Street
    • View Profile
Issues Building with MinGW
« Reply #1 on: December 11, 2011, 04:40:57 pm »
I had the same error on windows, I was using mingw with gcc
4.4.

I installed the latest version (4.6.1), it works now.

Nyrus

  • Newbie
  • *
  • Posts: 7
    • View Profile
Issues Building with MinGW
« Reply #2 on: December 14, 2011, 12:53:28 am »
I just updated mingw and gcc, and I'm still getting the errors.

Nyrus

  • Newbie
  • *
  • Posts: 7
    • View Profile
Issues Building with MinGW
« Reply #3 on: December 20, 2011, 03:02:35 pm »
Well thanks for the response, I managed to fix my problem by getting the missing dll from the mingw at http://sourceforge.net/projects/mingw/files/