-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
cannot import in windows (linking error) #755
Labels
Comments
Did you build the tools yourself? If so, can you try applying this patch to src/cmd/ld/lib.c and rebuilding them? diff -r 7a932654bb51 src/cmd/ld/lib.c --- a/src/cmd/ld/lib.c Thu Apr 29 11:02:10 2010 -0700 +++ b/src/cmd/ld/lib.c Thu Apr 29 13:28:22 2010 -0700 @@ -103,6 +103,10 @@ sprint(name, ""); i = 1; } else + if(isalpha(histfrog[0]->name[1]) && histfrog[0]->name[2] == ':') { + sprint(name, ""); + i = 0; + } else if(histfrog[0]->name[1] == '.') { sprint(name, "."); i = 0; Thanks. Russ Owner changed to r...@golang.org. Status changed to Accepted. |
Applied the patch to release 2010-04-27 and rebuilt on windows using mingw. Tested using the svgo library. It appears there's a forward slash pre-pended to the fqfn of the library file to be imported. Also note that although the import fails a 0 KB executable is created. The import block in the go test file: import { svglib "./svg" "os" } cmd shell output ---------------- C:\temp\svgo>8g testsvgo.go C:\temp\svgo>8l -o testsvgo.exe testsvgo.8 ??none??: cannot open file: /C:/temp/svgo/svg.8 |
Round 2: thanks for testing: diff -r 7a932654bb51 src/cmd/ld/lib.c --- a/src/cmd/ld/lib.c Thu Apr 29 11:02:10 2010 -0700 +++ b/src/cmd/ld/lib.c Thu Apr 29 14:54:41 2010 -0700 @@ -103,6 +103,10 @@ sprint(name, ""); i = 1; } else + if(isalpha(histfrog[0]->name[1]) && histfrog[0]->name[2] == ':') { + strcpy(name, histfrog[0]->name+1); + i = 1; + } else if(histfrog[0]->name[1] == '.') { sprint(name, "."); i = 0; |
This issue was closed by revision 74a2364. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by pallas0328@yahoo.com.cn:
The text was updated successfully, but these errors were encountered: