Monday, April 21, 2025
HomeGolangCGO: C++ Commonplace Library (darwin) - Getting Assist

CGO: C++ Commonplace Library (darwin) – Getting Assist


I’m experimenting with mac’s deprecated reflective loading functionalities. I’ve a go program that invokes the go compiler to create binaries, however apple’s implementation of reflective loading is reliant on C++ for exception dealing with.

As I perceive it, CGO is just for C and requires a C wrapper to make use of C++ code, however I can not work out of it’s attainable to simply hyperlink customary libraries. I attempted passing -lc++ and -lc++abi as linker flags together with -L /usr/lib, and another issues, however no luck.

What can be the only approach to do that? Please be happy to ask for elaboration if essential, I’m new to programming, go, and nonetheless studying the C toolchain, and taking part in with software program that’s barely above my paygrade, so I might need missed some necessary ideas.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments