gpt4 book ai didi

c++ - 如何在 C++ 文本编辑器中引用第三方库?

转载 作者:行者123 更新时间:2023-11-30 05:43:35 27 4
gpt4 key购买 nike

<分区>

为了示例目的,假设我使用的是普通记事本。我将如何引用我下载的第 3 方库以便我能够访问其头文件?这可能是一件非常容易做到的事情。有人可以向我解释一下吗?我正在使用类似于 joes 文本编辑器的文本编辑器。这是我使用 C++ 的 sfml 库编写的一些示例代码。我不知道如何让文本编辑器知道 sfml 的头文件在哪里。

#include <SFML/Window.hpp>

int main()
{
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
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
window.display();
}

return 0;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com