0

对于我的生活,我无法让 scons 链接这些 SFML 库。我相信我遵循了 scons 网站所说的关于图书馆链接的所有内容,所以我不知道该怎么做:

import fnmatch
import os

#Setup environment
file_match = "*.cpp"

#Recursive Glob method to find all source files
matches = []
for root, dirnames, filenames in os.walk("src/"):
    for filename in filenames:
        if fnmatch.fnmatch(filename, file_match):
            matches.append(os.path.join(root, filename))

#Compile the program
env = Environment();
env.Append(LIBS = ["sfml-graphics","sfml-window","sfml-system"]);
env.Append(LIBPATH = "/usr/local/lib");
env.Program(target = "Game", source = matches)

编辑:这段代码显然有效。看来我的电脑只需要休息几天就可以自行修复。

4

0 回答 0