Skip to content

What to link against for utils::Path #8529

@yuzeni

Description

@yuzeni

This might be a silly question, but I can't figure out what I need to link against to get the functionality in utils/Path.h. 'libutils' doesn't do the trick.
Here is what I have tried:

On Linux:

  1. Get the latest release
  2. Follow the steps in the README.md for the minimal filament project.
  3. Replace the suggested main.cpp with this:
#include <filament/FilamentAPI.h>
#include <utils/Path.h>
int main() {
    auto path = utils::Path("");
    path.getName();
}

Executing make will fail with an 'undefined reference' error for getName().
Full output:

clang++ -Iinclude/ -std=c++17 -pthread -c main.cpp
clang++ -Llib/x86_64/ main.o -lfilament -lbackend -lbluegl -lbluevk -lfilabridge -lfilaflat -lutils -lgeometry -lsmol-v -lvkshaders -libl -lpthread -lc++ -ldl -o main
/usr/bin/ld: main.o: in function `main':
main.cpp:(.text+0x2c): undefined reference to `utils::Path::getName[abi:cxx11]() const'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:5: main] Fehler 1

On Windows:

Fails to compile with just

#include <filament/FilamentAPI.h>
#include <utils/Path.h>
int main() {
    auto path = utils::Path("");
}

Linking with all the libraries in the libs folder and shuffeling the order also didn't work.
I tried to be thorough and not miss the obvious. Hoping I am not wasting anyone's time with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions