Home > Blockchain >  how to specify header file and library path when building a go program which import a cgo package?
how to specify header file and library path when building a go program which import a cgo package?

Time:09-30

I have a simple go program named A and it needs to import a cgo project named B as a module. B needs to include a header file and link a shared object. The header file and shared object are not standard paths (/usr/include, /usr/lib) but in a work directory compiled manually.

How I can run go build in A's source directory but specify header/so file path for B? I need to use CMake to do it.

Appreciated it if someone can help.

Thanks,

CodePudding user response:

already use ExternalProject custom build command to work around it.

  • Related