Search code examples
c++windowsnetbeanssfml

Setting SFML up with NetBeans in Windows


Hi I am having problems with trying to get sfml going with netbeans. Here is a short video of what I have done. video

After listening to HEKTO I now downloaded the MSYS. I removed the static libraries and get this error now:

    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)

After adding system path.. heres new img:

system path img


Solution

  • The SFML developers recommend the exact match between your MinGW version and your SFML version - please see this page, especially these three lines:

    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) 
    

    Your MinGW compiler is 8.2.0 - it doesn't match. So you'll need to download the MinGW using links from this page and install it manually.

    Also you try to link with static libraries (with suffix _s). In this case you have to add other libraries to the linker setup - please see here. If to use dynamic libraries then you won't need any additional libraries, however the SFML directory with its DLLs will need to be added to the system path.

    UPDATE. Your question has been rewritten many times, so my answer has become irrelevant - this is not good, the question can be updated to improve it, but please not to rewrite it completely following additional information given to you in comments. References to videos and pictures aren't welcomed here also. Your question must be self-contained and potentially helpful for others, looking for help in similar situations.

    That said I'll add two tips for future generations:

    • Don't use relative paths for include and lib directories in the NetBeans compiler and linker setup - use only absolute paths.

    • MinGW distributions, referenced on the SFML downloading page, don't contain the MSYS (small collection of Unix tools, which includes make.exe). You'll need to download and install the MSYS separately, for example using the MinGW installer with msys-base package only.