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?
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.
>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>
{
"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
}
{
"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"
}
]
}
> 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