B
B
Boniface2014-10-23 09:09:36
go
Boniface, 2014-10-23 09:09:36

Why golang .a files?

Hi all!
Can you please tell me why Go needs .a files? After all, without sorts, you still can’t build an application. That is, if you have the bigPak package and use it in your main.go program, your program will not build without the bigPak sources even if you have bigPak.a . So why is it needed? :)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
Boniface, 2014-10-23
@Boniface

Actually this is understandable. It is not clear why it cannot be assembled into an executable without sorts.

S
Sergey Lerg, 2014-10-23
@Lerg

.a files are precompiled packages that are then built into an executable.

S
SilentFl, 2014-10-23
@SilentFl

*.a are precompiled libraries compiled for one specific architecture. Accordingly, in order to use such a lib without source codes, at least two conditions must be met:
1) compile under the same architecture under which the lib was built;
2) compile with the same compiler version (because compatibility between compiler releases is only guaranteed for code, NOT for libs).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question