Answer the question
In order to leave comments, you need to log in
The default application on the SFML library is not compiled, what should I do?
Hello, the default code of the SFML library does not want to be compiled,
#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;
}
Error LNK2019 reference to unresolved external symbol [email protected] in function "int __cdecl invoke_main(void)" ([email protected]@YAHXZ) TestGameSfml D:\Programming code c++\TestGameSfml\TestGameSfml\MSVCRTD.lib(exe_winmain.obj)
Answer the question
In order to leave comments, you need to log in
Little information - development environment, are SFML linked, are the paths to lib and h files connected?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question