Sunday, November 30, 2025
HomeGolangGo software compile - Technical Dialogue

Go software compile – Technical Dialogue


Hello,

I’m attempting to include our go code into our present cmake construct. We at present have intensive use of generator expressions and different cmake options that make it not very best to simply use customized instructions/customized actions.

I’m attempting to combine go natively into cmake. Cmake has help for added languages however they should observe the prevailing sample which principally boils right down to first compile into object file then hyperlink to executable.

Wanting on the go compiler it makes use of go construct which does the each steps without delay. I did come throughout go software compile -o principal.go however after I run this on home windows I can’t appear to get it to seek out normal packages like fmt. I attempted so as to add the -std choice however it doesn’t appear to do something from what I can inform. The shortage of documentation right here can be inflicting me to not be capable of get this resolved. My understanding is that with present variations the usual packages aren’t on disk however compiled as wanted however I can’t appear to get go software compile to determine this out.

I’ve additionally learn some boards saying that go software compile is now not supported. Is that this true or is there a strategy to make this create an object file that I can then hyperlink in separate step?

I’m able to work round this barely by operating go construct because the compile command after which within the hyperlink command simply copy what it thinks is the article file to the output however this looks as if an enormous hack that can come again to trigger issues later. I actually want to simply compile to object file and hyperlink object file in separate step.

Can anybody assist me determine the way to get go software compile to work with normal libraries as of late?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments