Hi
I have a c++ project Im working on under windows.
it uses a 3rd party library (ie, i have headers and dll).
mostly for development I'd like to be able to work on it under linux. and i thought that should be easy with wine.
but now i read through the Winelib User's Guide and Im somewhat lost.
its talking about winemaker and bad cases of filenames, generating makefiles and stuff.
Im pretty sure thats not an issue in my situation. I can compile my code using g++ and the 3rd party headers(almost - theres something related to some macros inside these headers ... but i think i should be able to resolve that)
but i cant link it (obviously - its .dll )
can someone give me some hint about how to proceed, what to read?
thx
directions for porting my own code using 3rd party dll
-
- Level 5
- Posts: 336
- Joined: Mon Nov 24, 2008 8:10 am
It is not possible to simply use winelib for linking to a win32 dll. You have to compile ALL of your code using winegcc/wineg++, so your whole app will depend on wine. The reason for this is that wine needs to do a lot of magic (registry, file system, windows memory layout ...).
If you don't want that then the only way is to write a small winelib app and use some form of IPC to communicate between the linux and winelib app (e.g. using unix sockets or whatever). Look at the wine-devel archive for discussions about this.
If you don't want that then the only way is to write a small winelib app and use some form of IPC to communicate between the linux and winelib app (e.g. using unix sockets or whatever). Look at the wine-devel archive for discussions about this.
Re: directions for porting my own code using 3rd party dll
Don't use Winelib... use mingw on linux to build your app, then run it withsancts wrote: I have a c++ project Im working on under windows.
it uses a 3rd party library (ie, i have headers and dll).
mostly for development I'd like to be able to work on it under linux. and i thought that should be easy with wine.
but now i read through the Winelib User's Guide and Im somewhat lost.
wine. Much easier.
thanks for these hints
do you know whether thats also possible under macosx?
thanks
well so far that doesnt sound all too scary. that simply means setting CXX=wineg++ doesnt it?Thunderbird wrote:It is not possible to simply use winelib for linking to a win32 dll. You have to compile ALL of your code using winegcc/wineg++, so your whole app will depend on wine.
even if my code has no notion whatsoever about registry, etc? i dont use any libraries from MS, like MFC or whatever (dont even know them).Thunderbird wrote:The reason for this is that wine needs to do a lot of magic (registry, file system, windows memory layout ...).
now, that sounds scary :(Thunderbird wrote:If you don't want that then the only way is to write a small winelib app and use some form of IPC to communicate between the linux and winelib app (e.g. using unix sockets or whatever). Look at the wine-devel archive for discussions about this.
ok, i think ill look into that.DanKegel wrote:Don't use Winelib... use mingw on linux to build your app, then run it with wine. Much easier.
do you know whether thats also possible under macosx?
thanks