I recently installed code::blocks, and it appears to be working fine. It is able to run a "Hello, world!" program with no issues, but when I linked it with SFML (following the tutorial for setup with code::blocks on the SFML site) and ran the test code they provided (below), I got the following error:
||=== Build: Debug in Code::Blocks SFML Template (compiler: GNU GCC Compiler) ===|
ld.exe||cannot open output file \\bin\Debug\Code:Blocks SFML Template.exe No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 54 second(s)) ===|
I am running this on Windows 7 and Code::Blocks 13.12 with MinGW
the build log gave the following error:
-------------- Build: Debug in Code::Blocks SFML Template (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -L..\SFML\SFML-2.2\lib -o "\\bin\Debug\Code:Blocks SFML Template.exe" obj\Debug\main.o ..\SFML\SFML-2.2\lib\libsfml-graphics.a ..\SFML\SFML-2.2\lib\libsfml-window.a ..\SFML\SFML-2.2\lib\libsfml-system.a -mwindows
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot open output file \\bin\Debug\Code:Blocks SFML Template.exe: No such file or directory
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 9 second(s))
1 error(s), 0 warning(s) (0 minute(s), 9 second(s))
and finally, the example code from the SFML website.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#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;
}
|