在 Windows 中使用 NetBeans 设置 SFML

Setting SFML up with NetBeans in Windows

本文关键字:NetBeans 设置 SFML Windows      更新时间:2023-10-16

嗨,我在尝试让 sfml 与 netbeans 一起使用时遇到问题。这是我所做工作的简短视频。视频

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

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:UsersdavidDocumentsNetBeansProjectstesterdistDebugMinGW_1-Windowstester.exe 
RUN FAILED (exit value -1,073,741,515, total time: 58ms)

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

系统路径图像

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

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- 它不匹配。因此,您需要使用此页面的链接下载MinGW并手动安装。

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

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

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

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

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