SFML community forums

Help => General => Topic started by: Jzx on January 02, 2018, 12:04:20 am

Title: I can't compile
Post by: Jzx on January 02, 2018, 12:04:20 am
The program is as follows:
#include <SFML/Graphics.hpp>

int main()
{
 
}
Everything goes OK if I use
Quote
clang++ helloworld.cpp -I/usr/include/ -lsfml-graphics -lsfml-window -lsfml-system
. But when I try to cross-compile it for Windows I get an error:
Quote
clang++ helloworld.cpp -I/usr/include/ -lsfml-graphics -lsfml-window -lsfml-system -target x86_64-win32
helloworld.cpp:1:10: fatal error: 'ostream' file not found
#include <ostream>
         ^
1 error generated.
Any ideas how to fix?
Title: Re: I can't compile
Post by: eXpl0it3r on January 02, 2018, 02:03:58 am
It's not really related to SFML, e.g. just include ostream yourself and you'll most likely get the same error.

As such you will probably find better answers on something like StackOverflow or similar.

Personally, I find it easier to just boot into a Windows VM and build something natively or if it's open source use Travis/Appveyor to automate builds.