Все шло нормально до 6:16. Я установил последнюю стабильную версию SFML (3.0.2) и mingw64 с веб-сайта SFML, в частности файлы под названием «WinLibs UCRT 14.2.0 (64 бит)» и «GCC 14.2.0 MinGW (SEH)(UCRT)(64 бит)» с веб-сайта SFML.
Я скопировал путь к папке bin для ming64 и sfml и вставил его в путь к среде редактирования. Я перезапустил VSCode, поместил путь к папке включения в файл «c_cpp_properties.json», а затем вставил код SFML по умолчанию с их обучающего веб-сайта:
Код: Выделить всё
#include
int main()
{
// create the window
sf::RenderWindow window(sf::VideoMode({800, 600}), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
while (const std::optional event = window.pollEvent())
{
// "close requested" event: we close the window
if (event->is())
window.close();
}
// clear the window with black color
window.clear(sf::Color::Black);
// draw everything here...
// window.draw(...);
// end the current frame
window.display();
}
}
Что мне теперь делать?
Обновить -: теперь работает через cmd, но не с запуском кода в VSCode. Спасибо всем за помощь.
Подробнее здесь: https://stackoverflow.com/questions/798 ... -in-vscode
Мобильная версия