Yep., I added dynlibs. Eh... I suppose should do dynamic library... But I didn't use dynamic linking before. Have I to make different code for windows libraries and linux?
Yep., I added dynlibs. Eh... I suppose should do dynamic library... But I didn't use dynamic linking before. Have I to make different code for windows libraries and linux?
I haven't tested this on linux yet. And that source I showed is what I did. No dynamic libraries used. IMO you shouldn't need to write seperate code for Windows and Linux, unless you use system dependent code.Originally Posted by Darkhog
But if you use dynamic linking then the Adress variable in my example will be used to load the library.
[pascal]
var
Form1: TForm1;
Adress: TLibHandle;
...
procedure TForm1.FormCreate(Sender: TObject);
begin
Adress := LoadLibrary('mylib.dll');
//OR
Adress := LoadLibrary('mylib.so');
end;
[/pascal]
Toy around and see what you can come up with...
Thanks for advice. This will be used later. For now I must get SDL to work and make designer
Bookmarks