-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
gccgo support #20
Comments
I'm not a master of gccgo. And I've not try them. Would you please point the source link that gcc go can't treat static. |
Do you know something like to use what the compiler is used? |
Good that you wrote again :) I'll try to check this soon. But by heart I don't know how to fix this cleanly. |
This is what I see:
I see this is unrelated to the 'static' keyword, but that's what I'm seeing now. :) I'll check a little more. |
Could you try with |
For example, what value do you get with |
|
The problem is that when "go build" builds the package using gccgo, it first compiles the sqlite3 library code (sqlite3.c) into sqlite3.o, and then compiles the cgo-generated files (sqlite3.cgo1.go et al) into sqlite3.o, overwriting the first one.
This problem does not occur with the gc compiler because it runs a totally different sequence of compiler commands, with different output filenames (for example the cgo-generated files are compiled into go.6 rather than sqlite3.o). To work around the problem, rename sqlite3.{h,c} to sqlite3-orig.{h,c}, and modify the #includes in sqlite3.go, backup.go, and sqlite3ext.h. |
|
The head of sqlite3.go has 'static int ...' C function declarations. Removing the 'static' word makes the package work for gccgo too.
The text was updated successfully, but these errors were encountered: