Hello all, is it possible to use the native Linux libraries instead of their Windows builds? This can be a newbie question. :) I have a database program based on PostgreSQL and I think that coyping the Windows libraries for the application to run is a bit luxury when the same but native libraries with the same functions already exist for Linux and they are already installed on my system. I tried to create a symlink from /usr/lib/libpq.so to libpq.dll in the application's directory but it didn't work. Any help is gladly appreciated :)
Cigydd wrote:> is it possible to use the native Linux libraries instead of their Windows builds?Short answer - no. Long answer - not directly. They most definitely will have different calling conventions, different structures, different ways to synchronize operations.
Cigydd wrote:> but WINE doesn't convert, manage or synchronize anything -Wrong, that is the major part of Wine's functionality. Cigydd wrote:> it[Wine] just implements what the Win32 applications are trying to call, so the whole Win32 API??Yup, pretty much. Since there are no such things as DirectX for Linux Wine must implement that from the scratch.
On Sun, 2010-07-18 at 23:33 -0500, Vincent Povirk wrote:> >From what I can tell, Java is not included at all in a stock Ubuntu > install or in a stock Windows install. >I'd be surprised if OpenJava isn't included in Ubuntu distros - it is in Fedora. However, like most developers, I use Sun/Oracle Java 1.6, which is a free download and very easy to install for Linux or Windows. Three ways of seeing if java is installed are: <Code> alternatives --display java # should mention Open Java as # 'current best' locate java # Lists all paths containing 'java' java -version # Displays the installed version </code> Martin
vitamin wrote:> > Cigydd wrote: > > but WINE doesn't convert, manage or synchronize anything - > > Wrong, that is the major part of Wine's functionality.OK, so then what's the principial difference? vitamin wrote:> > Cigydd wrote: > > it[Wine] just implements what the Win32 applications are trying to call, so the whole Win32 API?? > > Yup, pretty much. Since there are no such things as DirectX for Linux Wine must implement that from the scratch.Yes, absolutely. --Cigydd
Cigydd <wineforum-user at winehq.org> wrote:> > >vitamin wrote: >> >> Cigydd wrote: >> > OK, so then what's the principial difference? >> >> Do you know the difference between file descriptor and a handle? If not, then there is no point in answering that question. > >And I fear there's no point in continuing this discussion. >I've been like the fly on the wall, watching this discussion. Vitamin is correct in his statement. However, I will chime in with this: Wine is a psuedo-Windows environment with no current methodology to do what you are asking, that is directly access a dynamic library in the Linux/UNIX environment. However, if you are willing to rebuild your application, then you might want to look into using Winelib. However, this may not give you access from a Windows application to the functions and calls of a native Linux/UNIX file. What we do is provide an interface between what looks like a UNIX/Linux dynamic library (.dll.so file) and the Windows32/Windows64 API. So, without alot of modification, Windows programs do not and cannot access Linux files directly. If you are working with a pure .NET application, you might want to look at using Mono to build your program. Since I'm not versed in Mono, you would have to ask if it is possible to do what you desire with their product in their forums. James McKenzie
To be more specific on my cause, the application that I originally wanted to use the libpq.so is developed in Delphi 5 for Win32. So it would be too much work to port it to .NET/Mono. My original question if it is possible to use native Linux libraries via Wine was clearly answered: No, it isn't possible because of different API and ABI. If we decide to port it to Linux, the best solution is probably FreePascal and Lazarus IDE. That's cross-platform based and the Object Pascal dialects in Delphi and Lazarus are quite compatible. The ported application will then use native Linux libraries :-) In the meantime, we'll try to run our application under Wine on Linux, using the Win32 versions of the libraries. I already found a small bug so look forward for it. Thank the whole Wine team for such a great project.
Cigydd <wineforum-user at winehq.org> wrote:>Sent: Jul 20, 2010 8:27 AM >To: wine-users at winehq.org >Subject: [Wine] Re: Native libpq.so instead of libpq.dll? > >To be more specific on my cause, the application that I originally wanted to use the libpq.so is developed in Delphi 5 for Win32. So it would be too much work to port it to .NET/Mono. >My original question if it is possible to use native Linux libraries via Wine was clearly answered: No, it isn't possible because of different API and ABI. >If we decide to port it to Linux, the best solution is probably FreePascal and Lazarus IDE. That's cross-platform based and the Object Pascal dialects in Delphi and Lazarus are quite compatible. The ported application will then use native Linux libraries :-) >In the meantime, we'll try to run our application under Wine on Linux, using the Win32 versions of the libraries.Thank you. Thus you do have a 'way forward' and thank you for supporting Linux as well as UNIX.>I already found a small bug so look forward for it.Please also update the Applications Database. This will help those who develop using Delphi to avoid problem areas.>Thank the whole Wine team for such a great project.You are welcome. Although I don't speak for the entire project, it has been a pleasurable discussion, a bit heated at times, but overall we came to a conclusion that works for the both of us and will help the project as well as you move forward. James McKenzie
John Drescher wrote:> I am confused on why you do not just use the windows version of libpq with your application and ignore the fact that the host os may or may > not have libpq installed. > > JohnDon't search for any logic behind my obsession for native libraries :-) I just said to myself ?I'm under Linux, could I make use of the libraries already installed? Do I have to copy the Windows ones? (They still take some space on the hard drive.) Could Wine be useful to serve as a bridge?? I was just curious if it would be possible. And it isn't. I didn't even imagine what difficulties are hidden behind.
Seemingly Similar Threads
- a simple Asterisk AMI interface with Delphi (or Lazarus+FreePascal)
- What to do to use libvorbis with FreePascal?
- is it possible to run delphi apps(forms) using wine
- RPostgreSQL package and libpq.dll file
- How to discover within my application if executed in Wine?