vitamin
2008-Jul-19 23:03 UTC
[Wine] Re: Winelib: How can I compile a Borland C++ Builder application
N?stor Amigo Cairo wrote:> So I will need to rewrite the application to run on Linux, but this > sounds strange, doesn't it?? I have not completely understood then the > purpose of winelib. Do you mean that it is not possible to build an > application from source (written using Win32 API) using gcc on Linux > and executing it natively??Correct. You can't run it directly only with Wine. (binfmt does not count) You can't just link with winelib and make your app Linux native. Wine implements totally different API that requires an environment to run in. And Wine is that environment. Few examples: 1. win32 threads and posix threads are totally different things. They can't be mixed or exchanged. Same applies to most synchronization primitives. 2. POSIX does not have anything close to what win32 handle is. 3. File system name space. 4. Registry is totally alien to *nix but it's a must for any windows app (even if it's not using it directly). None of those things can be magical created by linking to a library.
mikolajz
2008-Jul-20 09:24 UTC
[Wine] Re: Winelib: How can I compile a Borland C++ Builder application
Winelib allows you to compile a Win32 application to an ELF binary that can be run directly on Linux (provided the winelib is installed). But, if I understand correctly, vitamin wouldn't call such an application native, as the winelib is quite a big dependency (e.g. your application will still create the ~/.wine wineprefix). However, technically it will be a correct native binary and it should be possible to debug it using Linux native debuggers. A bigger problem can be the VCL. It uses some Borland's C++ extensions (like properties and events) that are not handled by gcc. Also, I think winelib doesn't allow linking to binary DLLs (I think only the builtin *.dll.so and Linux native *.so), so you would need also to recompile VCL into a *.dll.so and, due to the mentioned extensions, I don't think it will be possible. Thus, I don't think it will work as winelib without some kind of a rewrite of the GUI. You can check, however, if this works under Wine. Then you can load the binary vcl.dll and your binary compiled with Borland's compiler. There is a high probability it will work. AFAIK big apps ported using Wine usually ship an *.exe and the Wine runtime.
Maybe Matching Threads
- Re: Winelib: How can I compile a Borland C++ Builder application
- Winelib: How can I compile a Borland C++ Builder application
- Winelib: How can I compile a Borland C++ Builder application on Linux using winelib?
- Re: Winelib: How can I compile a Borland C++ Builder application
- WineLib Warning?