-
m-relay<einliterflasche2:matrix.org> Hey, I’m building libwallet2_api using `mkdir -p build/libwallet; cd build/libwallet; cmake ../..; make -j${nproc} wallet_api`. Trying to link the produces binary and using that to open a wallet produces a lot of linker errors about missing symbols (pastebin.com/9pz2gk0N). It may be that I’m missing some deps that should be dynamically linked, but some of those symbols<clipped message>
-
m-relay<einliterflasche2:matrix.org> seem to be monero-internal, too. What am I doing wrong?
-
moneromoooThe first one, i18n_translate, is from monero itself. Somewhere in src/common IIRC. Could be a one pass linker, there are known issues with circular deps in monero.
-
moneromoooIs it on Mac ? IIRC Mac was more sensitive to this. Also debug builds, which you're not using.
-
moneromoooIn any case, I'd recommend running cmake with the parameters you'll find in the Makefile, adapted to your preference.
-
m-relay<einliterflasche2:matrix.org> It's a mac, yes.
-
m-relay<vtnerd:monero.social> If your linking against the .a, that doesn't contain all of the code necessary, you have to do a dynamic build or use cmake to track the dependencies
-
m-relay<einliterflasche2:matrix.org> Hm ok. The goal is to use ffi on it, so it'll have to be the second option.
-
m-relay<vtnerd:monero.social> There's the monero_c project which provides a c API wrapper around the wallet2_api interface. It uses add_subdirectory with a patch (which is in the process of being merged)
-
m-relay<vtnerd:monero.social> There's also fetchcontent with cmake instead of add subdirectory