How to know which files are going to be compiled and linked when you have several files which are specific to a system?
1条回答 默认 最新
- dongmouhao7438 2012-05-29 03:01关注
There are at least a couple of options:
- Use
go build -n
to list the commands that would be executed by a build, and then parse the output. - Use the
go/build
package. Specifically, look at the Import function.
I suggest the second method; if I understand your question correctly it does what you need. You specify a package to "import", and it returns a
Package
structure which contains, among other things, the set of Go, C, ASM files that will be compiled.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 - Use
悬赏问题
- ¥20 win11修改中文用户名路径
- ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
- ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
- ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
- ¥15 帮我写一个c++工程
- ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
- ¥15 关于smbclient 库的使用
- ¥15 微信小程序协议怎么写
- ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
- ¥20 怎么用dlib库的算法识别小麦病虫害