Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - timedog

Pages: [1]
1
General / Re: Can't setup SFML 2.6 with VSCode on Windows
« on: September 28, 2023, 06:58:35 am »
Okay, I get it now. It was not obvious to me that those links were mingw, because I'm a beginner. I've now made a working VSCode SFML 2.6 Template repo including text instructions so I don't have to remember this stuff again. Thanks.

The only problem now is that I don't know how to create separate debug and normal releases with make (unless the exe is exactly the same between debug and normal, and the only difference is the dll files used). Probably need to do more research.

2
General / Re: Can't setup SFML 2.6 with VSCode on Windows
« on: September 27, 2023, 07:19:52 am »
I didn't miss it, if you're talking about the box that mentions Visual Studio, I just don't know how to interpret that information outside of the context of Visual Studio use. How do I check which compiler my package is using? How do I find a mingw package with the correct compiler? I have no clue where to even start with figuring that out, nor did I have any clue that that information was applicable outside of Visual Studio use. If I did have a clue it would not have been necessary to create a post here, and I did so only after spending an entire day trying to figure this out. 

I did use that compiler information to download the correct SFML package for Visual Studio 2022, and everything worked fine there. I just think Visual Studio is clunky. Maybe I'll use both VSCode and Visual Studio though, only going to Visual Studio when doing heavy debugging, but using VSCode for most tasks.   

3
General / Can't setup SFML 2.6 with VSCode on Windows
« on: September 25, 2023, 08:54:55 am »
I got it working with Visual Studio, but decided that Visual Studio is really clunky and would rather just use VSCode. I've found a bunch of tutorials on doing this for previous versions, installing mingw and creating a Makefile and what not, but not for 2.6.

I spent the entire day trying to figure this out with bits and scraps of info from various sources. I can do a "make" command and it builds a main.exe file, but when I run the file no window shows up. I'm assuming I have the wrong version of something somewhere. Or maybe my previous installation of git bash terminal is messing with something?

Here's what I've done to get this far.
  • Installed mingw32 from this installer: https://github.com/niXman/mingw-builds-binaries

    Mingw installer options I chose:
    • Version: 13.1.0
    • Thread Model: posix
    • Architecture: 32-bit
    • Build Revision: rev1
    • C Runtime: ucrt
    • Directory for Installation: C:/
  • Went into the C:/mingw32/bin folder and went to the file "mingw32-make.exe" and renamed it to simply "make.exe"
  • From SFML Download page, downloaded: GCC 13.1.0 MinGW (DW2) - 32-bit
  • From that SFML download, copied the "lib" and "include" folders into this directory in my project: <project root>/src/
  • Added the files from the "/bin" folder in my SFML download into the root directory of my project, next to main.cpp, and Makefile.
  • Changed these settings in my VSCode settings file:
    • "C_Cpp.default.compilerPath": "C:/mingw32/bin/g++.exe",
    • "C_Cpp.default.includePath": ["${workspaceFolder}/**"]
  • Added Path variable "C:/mingw32/bin" for my Windows User (not System)
  • Added demo code from SFML site to main.cpp in my project, a green circle should pop up when running the program.
  • Ran "make" command in VSCode terminal from my project directory. This worked and created a "main.exe" file.
  • Ran "./main.exe" from the same place. This seemed to work, there were no errors or messages, but nothing popped up on my screen.

I feel like most of this is correct if I'm actually compiling and running the executable. Maybe I chose the wrong mingw installation? Can anyone advise on what I'm doing wrong?

Pages: [1]