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

Author Topic: Error Compiling Project with mingw on Linux  (Read 800 times)

0 Members and 1 Guest are viewing this topic.

Dayl3r

  • Newbie
  • *
  • Posts: 1
    • View Profile
Error Compiling Project with mingw on Linux
« on: February 02, 2017, 01:28:20 am »
Hi guys, I'm trying to compile an SFML project on Linux Mint 18 Cinnamon, for Windows, using mingw, with this command:

x86_64-w64-mingw32-g++ -o vanguardians main.o -lsfml-system

...and I'm getting this error:

/usr/bin/x86_64-w64-mingw32-ld: cannot find -lsfml-system
collect2: error: ld returned 1 exit status

Can anyone help? I guess basically what I'm asking is: How do I compile a .exe program for Windows, when I'm on Linux?
« Last Edit: February 02, 2017, 02:14:08 am by Dayl3r »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10845
    • View Profile
    • development blog
    • Email
Error Compiling Project with mingw on Linux
« Reply #1 on: February 02, 2017, 03:49:45 am »
And how much time did you spend in finding a solution/answers on your own?

I do not advise to cross-compile. There's never really a guarantee, that it will work out and it will cost you a lot more time figuring out all the issues, than it will take you to just install a Windows VM and build native binaries. On top of that, you'll actually be able to test the executable and fix potential bugs. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything