HomeAppleventura - g++ setting correct @rpath when constructing SFML

ventura – g++ setting correct @rpath when constructing SFML


I am attempting to construct an SFML pattern with out xcode (for causes :-)).

The prebuilt samples comes with:

pong> otool -L pong
pong:
    @rpath/sfml-audio.framework/Variations/2.5.1/sfml-audio (compatibility model 2.5.0, present model 2.5.1)
    @rpath/sfml-graphics.framework/Variations/2.5.1/sfml-graphics (compatibility model 2.5.0, present model 2.5.1)
    @rpath/sfml-window.framework/Variations/2.5.1/sfml-window (compatibility model 2.5.0, present model 2.5.1)
    @rpath/sfml-system.framework/Variations/2.5.1/sfml-system (compatibility model 2.5.0, present model 2.5.1)
    /usr/lib/libc++.1.dylib (compatibility model 1.0.0, present model 19.0.0)
    /usr/lib/libSystem.B.dylib (compatibility model 1.0.0, present model 159.1.0)

After I construct it myself (construct command follows), I reasonably receive:

pong> otool -L a.out
a.out:
    @rpath/libsfml-system.2.5.dylib (compatibility model 2.5.0, present model 2.5.1)
    @rpath/libsfml-window.2.5.dylib (compatibility model 2.5.0, present model 2.5.1)
    @rpath/libsfml-graphics.2.5.dylib (compatibility model 2.5.0, present model 2.5.1)
    @rpath/libsfml-audio.2.5.dylib (compatibility model 2.5.0, present model 2.5.1)
    /usr/lib/libc++.1.dylib (compatibility model 1.0.0, present model 1300.36.0)
    /usr/lib/libSystem.B.dylib (compatibility model 1.0.0, present model 1319.0.0)

This prevents my constructed model from operating, because it fails to load the library. How would I inform g++ to generate the identical @rpaths as these prebuilt?

The construct command I used is:

g++ Pong.cpp -I ../../embody -L ../../lib/ -lsfml-system -lsfml-window -lsfml-graphics -lsfml-audio

In case this makes any distinction, that is on Ventura.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments