Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: Creating an archive from an installed package fails #12461
Me again testing weird cross-compilation options and think I've found another problem
I have created a package and installed it that contains a few functions, structs and interfaces and have been able to use it successfully when using go build.
I'd like to write a shim package for interfacing with C code and have run up against the following error:
I have my custom package modemmanager built and installed:
But when I try and build the following I get the previous error:
The modemmanager package consists of simply
It makes no difference if I have the package available locally and specify the relative package location. Any ideas on why it can't run ar?
I had a weird path issue and it was picking up the wrong library (one without an import "C" and //export directives) so just user-error in that case.
The only real take-home from this is that the error message makes no reference to the lack of exports/import "C" and gives an AR failure instead. Closing as, well, it's solved.