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

Pages: [1]
1
General / Building with Bazel
« on: August 08, 2020, 11:03:53 pm »
Does anybody have experience with bazel projects that use SFML? I'm new to both.
I added this to my bazel WORKSPACE


workspace(name = "myfirstsfml")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "sfml",
    urls = [
        "https://www.sfml-dev.org/files/SFML-2.5.1-macOS-clang.tar.gz",
    ],
    sha256 = "6af0f14fbd41dc038a00d7709f26fb66bb7ccdfe6187657ef0ef8cba578dcf14",
    build_file = "BUILD.sfml",
)


And this is my external/BUILD.sfml

load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
    name = "sfml",
    hdrs = glob([
        "SFML-2.5.1-macos-clang/include/**/*.hpp",
        "SFML-2.5.1-macos-clang/include/**/*.inl",
    ]),
    copts = [
        "-Iexternal/SFML-2.5.1-macos-clang/include",
    ],
    visibility = ["//visibility:public"],
)


Getting a bunch of undefined symbols now, such as

Undefined symbols for architecture x86_64:
  "sf::RenderTarget::clear(sf::Color const&)", referenced from:
      _main in main.o

Pages: [1]
anything