Hi,
I am new to wine and i am trying to get some things done.
1. Is it possible to compile a native linux executable with winelib and use winapi functions like LoadLibrary() and GetProcAddress()? I made my buildsystem with winemaker.
2. I tried to use Common C++ [1] in my winelib application. But because of winelib/wineg++ (?) it assumes that it is running on windows and so the compilation failed. Is it possible to use such portable frameworks in a winelib application like in any other linux application?
Thanks for helping me out, Arne Gellhaus
On Thu, 8 Apr 2004, Arne Gellhaus wrote:
- Is it possible to compile a native linux executable with winelib and
use winapi functions like LoadLibrary() and GetProcAddress()? I made my buildsystem with winemaker.
Yes you can. This BW is a very good reason to have a Winelib application.
- I tried to use Common C++ [1] in my winelib application. But because
of winelib/wineg++ (?) it assumes that it is running on windows and so the compilation failed. Is it possible to use such portable frameworks in a winelib application like in any other linux application?
Indeed, this is a tricky one. Yes, I would assume that the library will think it's being compiled on Windows, yes. Is that a problem for you? It should still run.
Dimitrie O. Paun wrote:
On Thu, 8 Apr 2004, Arne Gellhaus wrote:
- Is it possible to compile a native linux executable with winelib and
use winapi functions like LoadLibrary() and GetProcAddress()? I made my buildsystem with winemaker.
Yes you can. This BW is a very good reason to have a Winelib application.
Is there some documentation available? I tried to compile my application with g++ and linked it with winelib, but it segfaulted when it called winapi functions. So the only way i got my program working was using wineg++.
- I tried to use Common C++ [1] in my winelib application. But because
of winelib/wineg++ (?) it assumes that it is running on windows and so the compilation failed. Is it possible to use such portable frameworks in a winelib application like in any other linux application?
Indeed, this is a tricky one. Yes, I would assume that the library will think it's being compiled on Windows, yes. Is that a problem for you? It should still run.
There are some missing types and some redefined types. I think this is because Common C++ wasn`t written with wine in mind. Is there a way to get this working without teaching Common C++ that it is possible to have winapi on linux?
Arne Gellhaus
Hi,
Not everyone calls an application build with Winelib a native linux executable as you need Wine to run it. You can't use wine stuff outside wine like you can do with normal libraries.
Roderick Colenbrander
Dimitrie O. Paun wrote:
On Thu, 8 Apr 2004, Arne Gellhaus wrote:
- Is it possible to compile a native linux executable with winelib and
use winapi functions like LoadLibrary() and GetProcAddress()? I made my
buildsystem with winemaker.
Yes you can. This BW is a very good reason to have a Winelib application.
Is there some documentation available? I tried to compile my application with g++ and linked it with winelib, but it segfaulted when it called winapi functions. So the only way i got my program working was using wineg++.
- I tried to use Common C++ [1] in my winelib application. But because
of winelib/wineg++ (?) it assumes that it is running on windows and so the compilation failed. Is it possible to use such portable frameworks in a winelib application like in any other linux application?
Indeed, this is a tricky one. Yes, I would assume that the library will think it's being compiled on Windows, yes. Is that a problem for you? It should still run.
There are some missing types and some redefined types. I think this is because Common C++ wasn`t written with wine in mind. Is there a way to get this working without teaching Common C++ that it is possible to have winapi on linux?
Arne Gellhaus
"Roderick" == Roderick Colenbrander thunderbird2k@gmx.net writes:
Roderick> Hi, Not everyone calls an application build with Winelib a Roderick> native linux executable as you need Wine to run it. You can't Roderick> use wine stuff outside wine like you can do with normal Roderick> libraries.
What has the GUI to do with a "native Linux" application?
What I think was being asked if you could use Winelib to build a native linux application that just uses wine for libraries (similar to gtk and other libs). In the case of wine your executable becomes a library which needs to be run by wine. Further you need other wine stuff (registry settings, c: drive ..). I'm not talking about the GUI.
Roderick
"Roderick" == Roderick Colenbrander thunderbird2k@gmx.net writes:
Roderick> Hi, Not everyone calls an application build with Winelib a Roderick> native linux executable as you need Wine to run it. You
can't Roderick> use wine stuff outside wine like you can do with normal Roderick> libraries.
What has the GUI to do with a "native Linux" application?
-- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
What I think was being asked if you could use Winelib to build a native linux application that just uses wine for libraries (similar to gtk and other libs). In the case of wine your executable becomes a library which needs to be run by wine. Further you need other wine stuff (registry settings, c: drive ..). I'm not talking about the GUI.
there is ongoing work to make wine usable as a shared library, at least in some contexts.
--p
Roderick Colenbrander wrote:
What I think was being asked if you could use Winelib to build a native linux application that just uses wine for libraries (similar to gtk and other libs). In the case of wine your executable becomes a library which needs to be run by wine. Further you need other wine stuff (registry settings, c: drive ..). I'm not talking about the GUI.
How does programs like mplayer, avifile and tvtime use windows dlls?
Arne Gellhaus
At the time those projects ripped small parts from wine to be able to load native dlls. Further there are also some other hacks to use wine as a shared libarary (mono stuff for example) and not too ago there was some other hack.
All these patches are not meant for all types of useage. Useally you need to use dlopen to access Wine then.
Roderick Colenbrander
Roderick Colenbrander wrote:
What I think was being asked if you could use Winelib to build a native linux application that just uses wine for libraries (similar to gtk and other libs). In the
case of wine your executable becomes a library which needs to be run by wine. Further you
need
other wine stuff (registry settings, c: drive ..). I'm not talking about the GUI.
How does programs like mplayer, avifile and tvtime use windows dlls?
Arne Gellhaus
On April 9, 2004 5:58 am, Arne Gellhaus wrote:
Yes you can. This BW is a very good reason to have a Winelib application.
Is there some documentation available? I tried to compile my application
Yes, the Winelib User Guide, but unfortunately (large) parts of it are currently obsolete.
with g++ and linked it with winelib, but it segfaulted when it called winapi functions. So the only way i got my program working was using wineg++.
That's the right thing to do, and the recommended method. You are on the right track. :)
There are some missing types and some redefined types. I think this is because Common C++ wasn`t written with wine in mind. Is there a way to get this working without teaching Common C++ that it is possible to have winapi on linux?
Common C++ was ported to Win32, so it should be easy to teach it that about that. This is probably the simplest way forward IMO. If you run into problems, I can help you out.