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

Pages: [1]
1
Does anyone use VS Code on Mac as a platform to compile SFML?

2
I'm new to SFML and C++. I followed official tutorials of Xcode on MacOS and it worked. But I want to code on VS Code.  I was just trying to test if SMFL works on VS Code.

This is my code:
#include <SFML/Graphics.hpp>
using namespace sf;

int main(){
    RenderWindow window(VideoMode(320,480),"The Game!");
    return 0;
}

When I'm trying to build tasks, I get this:
Executing task: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -g /Users/xxx/projects/simple_project/teris/main.cpp -o /Users/Cyxzk/projects/simple_project/teris/main -I /Users/xxx/Documents/externalLib/SFML-2.5.1-macos-clang/include <
In file included from /Users/xxx/projects/simple_project/teris/main.cpp:1:
In file included from /Users/xxx/Documents/externalLib/SFML-2.5.1-macos-clang/include/SFML/Graphics.hpp:32:
In file included from /Users/xxx/Documents/externalLib/SFML-2.5.1-macos-clang/include/SFML/Window.hpp:32:
In file included from /Users/xxx/Documents/externalLib/SFML-2.5.1-macos-clang/include/SFML/System.hpp:32:
/Users/xxx/Documents/externalLib/SFML-2.5.1-macos-clang/include/SFML/Config.hpp:52:14: fatal error: 'TargetConditionals.h' file not found
    #include "TargetConditionals.h"
1 error generated.

My OS: macOS Catalina10.15.3    My compiler:clang11.0.0

In my tasks.json, I add two lines in args:
 "-I",
 "/Users/xxx/Documents/externalLib/SFML-2.5.1-macos-clang/include"

In c_cpp_properties.json, I add one line in "includePath":
"/Users/xxx/Documents/externalLib/SFML-2.5.1-macos-clang/include"

Do I miss this file on my PC? Or do I need to link dylib or something else?

Pages: [1]
anything