I used Firebird a few years ago, I'm not sure what could be wrong. How do you inicialize Firebird? I had to load libraries manually with something like this:
LoadLibrary(ExtractFilePath(Application.ExeName) + 'lib/libstdc++.so.5.0.7'); LoadLibrary(ExtractFilePath(Application.ExeName) + 'lib/libicudata.so.30.0'); LoadLibrary(ExtractFilePath(Application.ExeName) + 'lib/libicuuc.so.30.0'); LoadLibrary(ExtractFilePath(Application.ExeName) + 'lib/libicui18n.so.30.0'); DataBase.DatabaseName := fDataDir + 'cqrlog.fdb'; DataBase.UserName := 'SYSDBA'; DataBase.PassWord := 'masterkey'; DataBase.LibraryName := ExtractFilePath(Application.ExeName) + 'lib/libfbembed.so.2.1.1'; but I used UIB components. Also had to do some changes to firebird.conf. I'm sorry, don't remeber details :(. 2015-08-27 16:19 GMT+02:00 FreeMan <[email protected]>: > On 27.08.2015 16:25, Petr Hložek wrote: > >> My app has also 64bit support and works. I use setenv also in 64bit >> system but only in linux. Maybe that is the problem. The link I sent >> before, was from old source code. >> >> I use this unit to disable Ubuntu scrollbars using LIBOVERLAY_SCROLLBAR >> variable. It doesn't use libc unit in uses but loads it directly from so >> file. >> >> https://github.com/ok2cqr/cqrlog/blob/master/src/uScrollBars.pas >> >> Petr >> > Thank you Petr, > First link in sourceforge.net, This files and "src" folder not there. I > founded similar code in some gtk..... file and I tried from that. But this > last example from your link, and file. setenv function result return 0 If > I'm not wrong this mean is success. Someting is wrong but what is wrong ? :) > > program fb_embed_test; > > {$mode objfpc}{$H+} > > uses > {$IFDEF UNIX}{$IFDEF UseCThreads} > cthreads, > {$ENDIF}{$ENDIF} > Interfaces, // this includes the LCL widgetset > sysutils, > Forms, Unit1 > { you can add units after this }; > > {$IFDEF UNIX} > function setenv(_para1:Pchar; _para2:Pchar; > _para3:longint):longint;cdecl;external 'libc' name 'setenv'; > {$ENDIF UNIX} > > {$R *.res} > var L : LongInt; > begin > L := setenv(PChar('FIREBIRD'), > PChar(ExtractFilePath(Application.Exename)), 1); > L := setenv(PChar('LD_LIBRARY_PATH'), > PChar(ExtractFilePath(Application.Exename)), 1); > RequireDerivedFormResource := True; > Application.Initialize; > Application.CreateForm(TForm1, Form1); > Application.Run; > end. > > > and this is for test in unit1 > Memo1.Lines.Clear; > Application.GetEnvironmentList(Memo1.Lines); > I can not see that added variables. And can not access fbembeded. > > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
