Hello everyone!
Glad to see SFML2.0 has finally been released. :-) Unfortunately I experience the following issue right at the beginning, which is rather similar to this one about 6 years ago (http://en.sfml-dev.org/forums/index.php?topic=11.msg40#msg40):
I've a fresh installed Xubuntu 13.04 amd64, I've downloaded the GCC 32-Bit development files from here (http://sfml-dev.org/download/sfml/2.0/) and extracted them to:
<path>/SFML_2.0_32
I then went on to the linux tutorial (http://sfml-dev.org/tutorials/2.0/start-linux.php) and created a new main.cpp:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
As next compiled the program and tried to link it:
g++ -c -I "<path>/SFML_2.0_32/include/" main.cpp
g++ main.o -o sfml-app -L "<path>/SFML_2.0_32/lib" -lsfml-graphics -lsfml-window -lsfml-system
Result:
g++ main.o -o sfml-app -L "<path>/SFML_2.0_32/lib" -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: scipping incompatible <path>/SFML_2.0_32/lib/libsfml-graphics.so when searching for -lsfml-graphics
/usr/bin/ld: cannot find -lsfml-graphics
/usr/bin/ld: scipping incompatible <path>/SFML_2.0_32/lib/libsfml-window.so when searching for -lsfml-window
/usr/bin/ld: cannot find -lsfml-window
/usr/bin/ld: scipping incompatible <path>/SFML_2.0_32/lib/libsfml-system.so when searching for -lsfml-system
/usr/bin/ld: cannot find -lsfml-system
collect2: ld returned 1 exit status
And when using the -m32 Option:
g++ -m32 main.o -o sfml-app -L "<path>/SFML_2.0_32/lib" -lsfml-graphics -lsfml-window -lsfml-system
cs -lsfml-window -lsfml-system
/usr/bin/ld: cannot find crt1.o: File or folder not found
/usr/bin/ld: cannot find crti.o: File or folder not found
/usr/bin/ld: scipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.so when searching for -lstdc++
/usr/bin/ld: scipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: scipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: scipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: scipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: scipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find crtn.o: File or folder not found
collect2: ld returned 1 exit status
What am I doing wrong? Can someone proof these errors?
Thank you very much.