Re: [go-nuts] cgo and dynamic linking of shared labraries

2023-09-26 Thread Ian Lance Taylor
On Tue, Sep 26, 2023 at 3:32 AM sbezverk wrote: > > Thank you for your reply, I was under impression that prototype definitions > come from C header files, and since the compilation phase completes with > success, cgo finds all necessary function definitions. My problem is at the > linking pha

Re: [go-nuts] cgo and dynamic linking of shared labraries

2023-09-26 Thread sbezverk
Related question: is it possible to replace golang's "link" tool with "ld"? It looks like "ld" has greater flexibility to address my requirements. Thank you in advance for your guidance. Serguei On 26/09/23, 12:32, "sbezverk" mailto:sbezv...@gmail.com>> wrote: Thank you for your reply, I was

Re: [go-nuts] cgo and dynamic linking of shared labraries

2023-09-26 Thread sbezverk
Thank you for your reply, I was under impression that prototype definitions come from C header files, and since the compilation phase completes with success, cgo finds all necessary function definitions. My problem is at the linking phase when the linker by some reason tries to resolve ALL func

Re: [go-nuts] cgo and dynamic linking of shared labraries

2023-09-25 Thread Ian Lance Taylor
On Sat, Sep 23, 2023 at 6:38 AM sbezverk wrote: > > Since I could not find the answer in the cgo documentation, I would really > appreciate if somebody could help me to understand why when I build cgo code > with calls to the shared library, the linker tries to find the shared library > even th

[go-nuts] cgo and dynamic linking of shared labraries

2023-09-23 Thread sbezverk
Hello, Since I could not find the answer in the cgo documentation, I would really appreciate if somebody could help me to understand why when I build cgo code with calls to the shared library, the linker tries to find the shared library even though it is instructed to build dynamic binary an