How to use it with FireBird 5.0 or any other versions?
Hello! Can you help me? I'm trying to use your library with last version of firebird 5.0, I downloaded this from official site https://www.firebirdsql.org/en/firebird-5-0 (Firebird-5.0.1.1469-0-windows-x86.zip), then i copied full folder "include" which is located in zip archive with firebird In "connection.go" changed line with fbclient to "#cgo !darwin LDFLAGS: -LC:/Users/Admin/Documents/Sources/FireBird -lfbclient", and then it returns to me:
fb_test
C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Users/Admin/Documents/Sources/FireBird/fbclient.dll when searching for -lfbclient C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Users/Admin/Documents/Sources/FireBird/fbclient.dll when searching for -lfbclient C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lfbclient C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Users/Admin/Documents/Sources/FireBird/fbclient.dll when searching for -lfbclient collect2.exe: error: ld returned 1 exit status
but if i do the same things. but with Firebird x64 it returns to me the following exit status 0xc000007b
also main.go file
package main
import ( fb "fb_test/fb" "fmt" "log" )
const ( timezone = "Asia/Almaty" connStr = "database=localhost:/C:/Users/Admin/Documents/Sources/fCore/api.fcore/DATABASE1.FDB; username=USER; password=123qweAS; charset=NONE; role=rRDB$ADMIN; timezone=" + timezone + ";" )
func main() { fmt.Println("here we are") const SqlSchema = "CREATE TABLE TEST (ID INT, NAME VARCHAR(20))" const SqlSelect = "SELECT * FROM RDB$DATABASE"
conn, err := fb.Create(connStr)
if err != nil {
log.Fatalf("Unexpected error creating database: %s", err)
}
defer conn.Drop()
if conn.TransactionStarted() {
log.Fatal("Transaction should not be started before a statement is executed.")
}
if _, err := conn.Execute(SqlSchema); err != nil {
log.Fatalf("Unexpected error executing schema statment: %s", err)
}
if _, err := conn.Execute(SqlSelect); err != nil {
log.Fatalf("Unexpected error executing select statment: %s", err)
}
if !conn.TransactionStarted() {
log.Fatalf("Transaction should be started")
}
if err := conn.Commit(); err != nil {
log.Fatalf("Unexpected error committing transaction: %s", err)
}
if conn.TransactionStarted() {
log.Fatal("Transaction should not be started after transaction is committed.")
}
}