I am running Lubuntu 15.04 64-bit, and want to learn to code with SFML. I made a program just as a test:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(1366, 768), "Welcome Screen");
return 0;
}
Upon running it I receive the error:
bash: ./EOTL: cannot execute binary file: Exec format error
I have g++-4.9 installed and ran:
g++ -c -o EOTL main.cpp -libsfml-graphics -libsfml-window -libsfml-system
Please help me, and thank you in advance.
UPDATE: I guess g++ is very picky so I had to run:
g++ -c main.cpp -o EOTL
-c
option tells gcc to stop short of the link phase, resulting in a bare object file rather than an executable program: rerun your gcc command without the-c
and try again.-lsfml-graphics -lsfml-window -lsfml-system
(or an equivalentpkg-config
command). Are you following some sort of tutorial?