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 - Sogokong

Pages: [1]
1
General / Re: Get SFML to work in VS code
« on: December 12, 2018, 02:41:00 pm »
So I have to use both? Could you be more specific with how I'm supposed to build in win10?

2
General / Re: Get SFML to work in VS code
« on: December 12, 2018, 09:01:03 am »
I have tried both -I and -L, both of them gave me today another error.

Quote
>gcc .\main.cpp -o test.exe -L"\SFML-2.5.1\include\" -lsfml-graphics -lsfml-window -lsfml-sy
.\main.cpp:1:29: fatal error: SFML/Graphics.hpp: No such file or directory
 #include <SFML/Graphics.hpp>

>gcc .\main.cpp -o test.exe -I"\SFML-2.5.1\include\" -lsfml-graphics -lsfml-window -lsfml-sy
.\main.cpp:1:29: fatal error: SFML/Graphics.hpp: No such file or directory
 #include <SFML/Graphics.hpp>

While replayin I so that I used gcc in cmd so I tried to use g++ but no differece.

3
General / Get SFML to work in VS code
« on: December 11, 2018, 11:43:26 pm »
I have been trying to get SFML work in VS code for two days but no luck. I have tried different guides but non has proven helpful, so I decided to try it by my self.

Quick Info:
  • Windows 10 64x
  • minGW compiler
  • GCC 7.3.0 MinGW (DW2) - 32-bit
  • Visual Studio code v. 1.29.1

My c_cpp_properties.json:
Quote
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "C:/SFML-2.5.1/include"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "intelliSenseMode": "gcc-x64",
            "browse": {
                "path": [
                    "C:/SFML-2.5.1/include"
                ]
            }
        }
    ],
    "version": 4
}

My tasks.json:
Quote
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "build",
      "type": "shell",
      "command": "g++",
      "args": [
        "-g",
        "main.cpp",
        "-lsfml-graphics",
        "-lsfml-window",
        "-lsfml-system"
      ],
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "presentation": {
        // Reveal the output only if unrecognized errors occur.
        "reveal": "silent"
      },
      // Use the standard MS compiler pattern to detect errors, warnings and infos
      "problemMatcher": "$msCompile"
    }
  ]
}

I have tried to use the same commands a linux user is supposed to use in terminal, in my case powershell but got errors:

Quote
> gcc .\main.cpp -o test.exe -I"\SFML-2.5.1\include\" -lsfml-graphics -lsfml-window -lsfml-sy
stem
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lsfml-graphics
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lsfml-window
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lsfml-system
collect2.exe: error: ld returned 1 exit status


Do someone know how I can make this work?

Pages: [1]