Re: [fpc-devel] resources on non-windows platform

2016-11-21 Thread Jonas Maebe
Anton Kavalenka wrote: > {$R script.rc srcipt.res} > > This kind of resource management implies usage of windres (or any other > RC script compiler) > > With the crosscompilation things became funnier: > > I can under Linux get win32 exe with mingw-windres > > I can under Linux get Mach-O 32

Re: [fpc-devel] resources on non-windows platform

2016-11-21 Thread Sven Barth
Am 22.11.2016 08:04 schrieb "Anton Kavalenka" : > So the question - why current FPC can link .res under any platform (with the help of fpcres) but cannot build such file under any platform without foreign tools? Because there's no cross platform Pascal only tool for this. > Is

[fpc-devel] resources on non-windows platform

2016-11-21 Thread Anton Kavalenka
Dear FPC-all! I have a big projects with lots of DLLs. All of them are cross-platform and link the resources with $R directive. For version info I use .rc scripts to manage it under VCS and to prevent .RES flicker under different compilers (FPC and Delphi) Version info is a nice example.

Re: [fpc-devel] ANN: Management operators - final patch

2016-11-21 Thread Florian Klämpfl
Am 21.11.2016 um 02:54 schrieb Paul Ishenin: > 21.11.2016 8:16, Maciej Izak wrote: > > Overall you've made a great job and a perfect example of how to supply > patches for FPC. > > I have a small question regards the following commit: >> 13. >>

[fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Alfred
Thanks all for your help ! Cross-compiling LCL (GUI) works now ! (Simple) culprit : line-endings differences. I will add a screen-shot of an app compiled with Lazarus on Windows, running on Mac. Attachments are rejected by this list unfortunately. See:

Re: [fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Jonas Maebe
> On 21 Nov 2016, at 11:40, Alfred wrote: > > > So, as far as I understand correctly, if a fpc abc.o file is presented > towards the linker, it replaces the extension with tbd and goes looking for > abc.tbd. > I checked: if I add a dummy abc.tbd in the same location, all

Re: [fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Sven Barth
Am 21.11.2016 11:40 schrieb "Alfred" : > c++ code. Comments added inline. > > findFile(path): > Options::FileInfo Options::findFile(const std::string ) const > calls: You should check before this call whether the file exists. "tbdInfo.checkFileExists(*this, path.c_str());"

Re: [fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Sven Barth
Am 21.11.2016 11:40 schrieb "Alfred" : > > Well. > > All files that are needed by the linker, have to be found by the linker. > The osxcrosstools use a findfile process that is a bit peculiar. And not fully understood by me. Perhaps you can help. > > c++ code. > >

Re: [fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Jonas Maebe
Alfred wrote on Mon, 21 Nov 2016: So, as far as I understand correctly, if a fpc abc.o file is presented towards the linker, it replaces the extension with tbd and goes looking for abc.tbd. I checked: if I add a dummy abc.tbd in the same location, all goes well. That why I patched the

[fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Alfred
Well. All files that are needed by the linker, have to be found by the linker. The osxcrosstools use a findfile process that is a bit peculiar. And not fully understood by me. Perhaps you can help. c++ code. findFile(path): Options::FileInfo Options::findFile(const std::string ) const calls:

Re: [fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Sven Barth
Am 21.11.2016 10:15 schrieb "Alfred" : > > Please skip my previous mail. > > I think I found the problem. > I had to patch osxcross-tools to work with FPC. > Now I need a new patch to include .or files ! In how far did you have to patch the tools? The .or file should already

[fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Alfred
Please skip my previous mail. I think I found the problem. I had to patch osxcross-tools to work with FPC. Now I need a new patch to include .or files ! Thanks again for the advice. Will report back. ___ fpc-devel maillist -

[fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Alfred
Thanks for this info and advice. Sticking with Lazarus, I can see with "nm project1.or" S FPC_RESSYMBOL I can see with "nm project1.o" U FPC_RESSYMBOL The link-script includes project1.or and project1.o (naturally), so now I am puzzled. Any ideas ?

Re: [fpc-devel] ANN: Management operators - final patch

2016-11-21 Thread Maciej Izak
2016-11-21 2:16 GMT+01:00 Maciej Izak : > I have new dedicated branch located here: > > https://github.com/maciej-izak/freepascal/tree/fpc-management-operators > note: management operators are also available in version for NewPascal :

Re: [fpc-devel] Crosscompiling win towards darwin

2016-11-21 Thread Jonas Maebe
Alfred wrote: > With the osxcross tools, cross-compilation of non-LCL programs from > Windows to Darwin is now successful. > > When compiling with LCL, one final error keeps popping up: > Error: linker: Undefined symbols for architecture i386: > Error: linker: "FPC_RESSYMBOL", referenced from:

Re: [fpc-devel] ANN: Management operators - final patch

2016-11-21 Thread Maciej Izak
2016-11-21 2:54 GMT+01:00 Paul Ishenin : > Use fpc_Copy for Clone and fpc_Addref for Copy is misleading. First of all I don't like to have Florian in opposition to this feature ;) it is a teamwork. Anyway I agree that this is misleading... But as was suggested by