Skip to content

Consider adding rpath=. to example binaries #5

Description

@jonesmz

I was checking out the new example apps (Which, btw, sadly still don't work on my linux machine, though they don't crash or throw exceptions anymore :-)) and, since it'd been a good while since I toyed with them last, I ended up spending about half an hour trying to figure out what wasn't working that they would claim they couldn't find libraries in their own directory.

Turned out, ld wasn't looking for the libraries in the bin folder, just the default system ld library path.

If you add either an rpath=. (for cwd) or an rpath=${build artifact output directory}, that issue would be alleviated.

Looking here: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling

CMake has support for Rpath when building, and rpath when installing, so when someone runs "make install", the rpath fo rthe installed binaries and libraries is set appropriately for the system.

That, or add some more documentation to the Readme.md about launching the newly built examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions