Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/build: .syso files can't be specified with .go files #16090

Closed
kevinpostal opened this issue Jun 17, 2016 · 7 comments
Closed

go/build: .syso files can't be specified with .go files #16090

kevinpostal opened this issue Jun 17, 2016 · 7 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@kevinpostal
Copy link

I am trying to build a windows golang executable with exe information.

(https://github.com/josephspurrier/goversioninfo)

When using go build alone everything works as desired.

When I try to pass a specific go file to build the resource.syso is not included/added.

How would I go about passing the syso file to the go build command?

@mikioh
Copy link
Contributor

mikioh commented Jun 17, 2016

Is your problem the same as #16050?

@kevinpostal
Copy link
Author

I don't believe so. I am using go 1.5

The exe is generated correctly with go build alone. Its only when I pass go files to the build command do I have issues.

@mikioh
Copy link
Contributor

mikioh commented Jun 17, 2016

Then I think you need to describe the following:

1. What version of Go are you using (`go version`)?

2. What operating system and processor architecture are you using (`go env`)?

3. What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

4. What did you expect to see?

5. What did you see instead?

@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 23, 2016
@quentinmit quentinmit changed the title Specifying .syso Files In Go Build go/build: .syso files can't be specified with .go files Jun 23, 2016
@quentinmit
Copy link
Contributor

@kevinpostal Can you please provide us with a sample .go and .syso file, and show us what happens when you try to run "go build"? What error message do you get?

@quentinmit quentinmit added this to the Go1.8 milestone Jul 20, 2016
@rsc
Copy link
Contributor

rsc commented Oct 26, 2016

Closing for lack of information.

@rsc rsc closed this as completed Oct 26, 2016
@rsc
Copy link
Contributor

rsc commented Nov 7, 2016

It sounds like the answer is:

Naming .go files on the command line is a shorthand for making a package directory out of just those Go files. This is a convenience. If you need non-Go files to be in your package, then the solution is to put them in a directory.

@virtuald
Copy link

I've ran into the same issue, it appears that when you run 'go build' without naming .go files then it links the syso file (perhaps some autodiscovery?), and when you run go build and name each .go file, then it doesn't link the syso file. There is no error message reported, and the resulting binary still works (it just doesn't have the Windows resources in it).

@golang golang locked and limited conversation to collaborators Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
None yet
Development

No branches or pull requests

6 participants