在 Windows 中使用 NetBeans 设置 SFML

Setting SFML up with NetBeans in Windows

您好,我在尝试让 sfml 与 netbeans 结合时遇到问题。这是我所做的简短视频。 video

听完 HEKTO 我现在下载了 MSYS。我删除了静态库并现在收到此错误:

    The application failed with exit code -1073741515 (0xc0000135). 
This could indicate that no required .dll was found in the PATH. 
Please try to start the following command from the command shell (cmd.exe). 



This may give some additional information. 

C:\Users\david\Documents\NetBeansProjects\tester\dist\Debug\MinGW_1-Windows\tester.exe 

RUN FAILED (exit value -1,073,741,515, total time: 58ms)

添加系统路径后..这是新的img:

system path img

SFML 开发人员建议您的 MinGW 版本与 SFML 版本完全匹配 - 请参阅 this 页面,尤其是以下三行:

The compiler versions have to match 100%!
Here are links to the specific MinGW compiler versions used to build the provided packages:
TDM 5.1.0 (32-bit), MinGW Builds 7.3.0 (32-bit), MinGW Builds 7.3.0 (64-bit) 

您的 MinGW 编译器是 8.2.0 - 它不匹配。因此,您需要使用此页面的 links 下载 MinGW 并手动安装。

您还尝试 link 使用静态库(后缀 _s)。在这种情况下,您必须将其他库添加到 linker 设置中 - 请参阅 here。如果要使用动态库,则不需要任何额外的库,但是需要将 SFML 目录及其 DLL 添加到 系统路径

更新。您的问题已被重写多次,所以我的回答变得无关紧要 - 这不好,可以更新问题以改进它,但请不要按照评论中提供的其他信息完全重写。这里也不欢迎对视频和图片的引用。您的问题必须是独立的,并且可能对其他人有帮助,在类似情况下寻求帮助。

也就是说,我将为后代添加两个提示:

  • 不要在 NetBeans 编译器和 linker 设置中对 includelib 目录使用相对路径 - 仅使用绝对路径。

  • 在 SFML 下载 page 中引用的 MinGW 发行版不包含 MSYS(Unix 工具的小型集合,其中包括 make.exe)。您需要单独下载并安装 MSYS,例如仅使用带有 msys-base 包的 MinGW 安装程序。