ich habe folgenden Code auf Linux und will ihn kompilieren.
Code: Alles auswählen
EnableExplicit
UseMySQLDatabase()
If OpenConsole()
Define hDatabase.i = OpenDatabase(#PB_Any, "host=xxxxxxxxxx port=3306 dbname=testdb", "topsoftsql", "xxxxxxxxx", #PB_Database_MySQL)
If hDatabase
PrintN("Datenbank geoeffnet")
Else
PrintN("Fehler, kann Datenbank nicht oeffnen")
PrintN(DatabaseError())
EndIf
If hDatabase : CloseDatabase(hDatabase) : PrintN("Datenbank geschlossen") : EndIf
Input()
CloseConsole()
EndIf
End
Code: Alles auswählen
pbcompiler -d test.pb
******************************************
PureBasic 5.71 LTS (Linux - x64)
******************************************
Loading external modules...
Starting compilation...
Starting compilation...
18 lines processed.
Creating the executable.
- Feel the ..PuRe.. Power -
[Debugger Error] UseODBCDatabase(), UseSQLiteDatase() or UsePostgreSQLDatabase() need to be called before using database commands.
[Debugger Error] File: test.pb (Line: 5)
Do you wish to continue the program? (Yes, No, Debugger Console, Ignore all)
(y,N,d,i)
[Debugger Error] Input error from stdin, program is exiting.
Code: Alles auswählen
libiodbc.i686 : iODBC Driver Manager
libiodbc.x86_64 : iODBC Driver Manager
libiodbc-devel.i686 : Header files and libraries for iODBC development
libiodbc-devel.x86_64 : Header files and libraries for iODBC development
unixODBC.i686 : A complete ODBC driver manager for Linux
unixODBC.x86_64 : A complete ODBC driver manager for Linux
unixODBC-devel.i686 : Development files for programs which will use the unixODBC library
unixODBC-devel.x86_64 : Development files for programs which will use the unixODBC library
Gruß Topsoft