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

Author Topic: SFML2 on Win32 MinGW  (Read 3174 times)

0 Members and 1 Guest are viewing this topic.

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML2 on Win32 MinGW
« on: February 06, 2011, 07:41:59 pm »
I compiled sfml2 for mingw as static, and now i am trying to build my project in code::blocks under windows.

In the final step, when linking, ld returns 1, and the linking fails.
Code: [Select]
warning: ..\..\extlibs\libs-gcc/libsfml-window-s.a(dyajs00314.o): local symbol `' has no section

Anyone knows what this is?

Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2 on Win32 MinGW
« Reply #1 on: February 06, 2011, 08:40:00 pm »
No sorry, this is the first time I see this error, and using MiGW static libraries works fine for me. Did you ask Google what this error means?
Laurent Gomila - SFML developer

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML2 on Win32 MinGW
« Reply #2 on: February 06, 2011, 09:00:51 pm »
I was able to compile the project, mingw is such a mess, what the hell.

Question:

I built a DLL, which links sfml-graphics-s, etc.
That means that linking against that dll cuts the need to link for sfml right?

In Visual studio this works fine, sfml is inside the DLL file, and it works without linking sfml for every app which uses my dll.

I wrote a test application and it says undefined reference to the sfml stuff, even tough i link the DLL, whats wrong?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML2 on Win32 MinGW
« Reply #3 on: February 06, 2011, 10:43:22 pm »
Quote
I built a DLL, which links sfml-graphics-s, etc.
That means that linking against that dll cuts the need to link for sfml right?

Nop. Although your DLL contains the SFML function, it doesn't export them and your client application cannot load them from it. If you use SFML from two separate binaries, you should link to the dynamic version to avoid duplicating SFML modules in the same application.
Laurent Gomila - SFML developer

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
SFML2 on Win32 MinGW
« Reply #4 on: February 06, 2011, 11:09:00 pm »
Understood.
Thanks a lot for the help :)

 

anything